[PATCH 1/3]: show in hgweb the deleted file
Goffredo Baroncelli
kreijack at libero.it
Wed Jul 6 14:41:11 CDT 2005
# HG changeset patch
# User kreijack at inwind.REMOVEME.it
# Node ID e14ea21f78af9ac652956b12258568014a873498
# Parent 7369ec5d93f2ffd490a43970edd9adf8d2bbe269
show in the changelog html page the deleted files from the (first) parent
diff -r 7369ec5d93f2 -r e14ea21f78af mercurial/hgweb.py
--- a/mercurial/hgweb.py Mon Jul 4 23:42:26 2005
+++ b/mercurial/hgweb.py Wed Jul 6 19:37:30 2005
@@ -262,6 +262,15 @@
changes = cl.read(n)
hn = hex(n)
t = float(changes[2].split(' ')[0])
+ parent = cl.parents(n)[0]
+ if parent:
+ pchange = cl.read(parent)
+ mf = self.repo.manifest
+ pmf = mf.read(pchange[0])
+ mf = mf.read(changes[0])
+ deleted = [ x for x in pmf if not x in mf ]
+ else:
+ deleted = []
l.insert(0, self.t(
'changelogentry',
@@ -274,6 +283,7 @@
desc = changes[4],
date = t,
files = self.listfilediffs(changes[3], n),
+ deletedfiles = deleted,
rev = i,
node = hn))
parity = 1 - parity
diff -r 7369ec5d93f2 -r e14ea21f78af templates/changelogentry.tmpl
--- a/templates/changelogentry.tmpl Mon Jul 4 23:42:26 2005
+++ b/templates/changelogentry.tmpl Wed Jul 6 19:37:30 2005
@@ -21,4 +21,8 @@
<th class="files"><a href="?cmd=manifest;manifest=#manifest#;path=/">files</a>:</th>
<td class="files">#files#</td>
</tr>
+ <tr>
+ <th class="files">removed files:</th>
+ <td class="files">#deletedfiles#</td>
+ </tr>
</table>
\ No newline at end of file
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/18cf5572/attachment.pgp
More information about the Mercurial
mailing list