[PATCH 2/3]: show in hgweb the deleted file
Goffredo Baroncelli
kreijack at libero.it
Wed Jul 6 14:40:56 CDT 2005
# HG changeset patch
# User kreijack at inwind.REMOVEME.it
# Node ID 681b2324000b7d4dbf56a7398bd5a08f63ff44e3
# Parent e14ea21f78af9ac652956b12258568014a873498
show in the search html page the deleted files from the parent
diff -r e14ea21f78af -r 681b2324000b mercurial/hgweb.py
--- a/mercurial/hgweb.py Wed Jul 6 19:37:30 2005
+++ b/mercurial/hgweb.py Wed Jul 6 19:38:02 2005
@@ -333,6 +333,16 @@
hn = hex(n)
t = float(changes[2].split(' ')[0])
+ parent = cl.parents(i)[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 = []
+
yield self.t(
'searchentry',
parity = count & 1,
@@ -344,6 +354,7 @@
desc = changes[4],
date = t,
files = self.listfilediffs(changes[3], n),
+ deletedfiles = deleted,
rev = i,
node = hn)
diff -r e14ea21f78af -r 681b2324000b templates/searchentry.tmpl
--- a/templates/searchentry.tmpl Wed Jul 6 19:37:30 2005
+++ b/templates/searchentry.tmpl Wed Jul 6 19:38:02 2005
@@ -17,6 +17,9 @@
<tr>
<td align="right" valign="top"><a href="?cmd=manifest;manifest=#manifest#;path=/">files</a>: </td>
<td>#files#</td></tr>
+<tr>
+ <td align="right" valign="top">removed files: </td>
+ <td>#deletedfiles#</td></tr>
</table>
</div>
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/a88dacd4/attachment-0001.pgp
More information about the Mercurial
mailing list