[PATCH 3/3]: show in hgweb the deleted file

Goffredo Baroncelli kreijack at libero.it
Wed Jul 6 14:41:17 CDT 2005


# HG changeset patch
# User kreijack at inwind.REMOVEME.it
# Node ID d96671bc903f62fa76416a1cd0b8a6bec3410c3d
# Parent  681b2324000b7d4dbf56a7398bd5a08f63ff44e3
show in the changeset html page the deleted files from the parent

diff -r 681b2324000b -r d96671bc903f mercurial/hgweb.py
--- a/mercurial/hgweb.py        Wed Jul  6 19:38:02 2005
+++ b/mercurial/hgweb.py        Wed Jul  6 19:38:19 2005
@@ -384,6 +384,13 @@
         def diff():
             yield self.diff(p1, n, changes[3])

+        if p1:
+            pchange = cl.read(p1)
+            pmf = self.repo.manifest.read(pchange[0])
+            deleted = [ x for x in pmf if not x in mf ]
+        else:
+            deleted = []
+
         yield self.t('changeset',
                      diff = diff,
                      rev = cl.rev(n),
@@ -395,6 +402,7 @@
                      author = changes[1],
                      desc = changes[4],
                      date = t,
+                     deletedfiles = deleted,
                      files = files)

     def filelog(self, f, filenode):
diff -r 681b2324000b -r d96671bc903f templates/changeset.tmpl
--- a/templates/changeset.tmpl  Wed Jul  6 19:38:02 2005
+++ b/templates/changeset.tmpl  Wed Jul  6 19:38:19 2005
@@ -34,6 +34,9 @@
  <th class="files">files:</th>
  <td class="files">#files#</td></tr>
 <tr>
+ <th class="files">removed files:</th>
+ <td class="files">#deletedfiles#</td></tr>
+<tr>
  <th class="description">description:</th>
  <td class="description">#desc|escape|addbreaks#</td>
 </tr>


Goffredo
-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack AT inwind DOT it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.selenic.com/pipermail/mercurial/attachments/20050706/aea0bc64/attachment.pgp


More information about the Mercurial mailing list