[PATCH] Permit hgweb to show the deleted files in the changeset diff

Goffredo Baroncelli kreijack at libero.it
Wed Jul 6 12:34:34 CDT 2005


Hi,

this patch permits hgweb to show the deleted files in the changeset diff

Goffredo

# HG changeset patch
# User kreijack at inwind.REMOVEME.it
# Node ID 08b33970007e753f12b2b2f9d0e169981a6e8c3c
# Parent  7369ec5d93f2ffd490a43970edd9adf8d2bbe269
this patch permits hgweb to show the deleted files in the changeset diff

diff -r 7369ec5d93f2 -r 08b33970007e TODO
--- a/TODO      Mon Jul  4 23:42:26 2005
+++ b/TODO      Wed Jul  6 17:02:44 2005
@@ -33,7 +33,6 @@
 - hgweb: deliver static files (e.g. favicon, stylesheets)
 - hgweb personalization: timezone (display/change), display of
   features
-- hg export 240 shows -tkmerge (good), hgweb does not (bad).
 - some web servers think hgweb.cgi.[di] is a CGI script with old-http://
   (use quoting (see foo.d in Core) or document server configurations?)
 - link children in hgweb
diff -r 7369ec5d93f2 -r 08b33970007e mercurial/hgweb.py
--- a/mercurial/hgweb.py        Mon Jul  4 23:42:26 2005
+++ b/mercurial/hgweb.py        Wed Jul  6 17:02:44 2005
@@ -208,7 +208,8 @@
         date2 = self.date(change2)

         c, a, d, u = r.changes(node1, node2)
-        c, a, d = map(lambda x: filterfiles(x, files), (c, a, d))
+        if files:
+            c, a, d = map(lambda x: filterfiles(x, files), (c, a, d))

         for f in c:
             to = r.file(f).read(mmap1[f])
@@ -361,7 +362,7 @@
                                 filenode = hex(mf.get(f, nullid)), file = f))

         def diff():
-            yield self.diff(p1, n, changes[3])
+            yield self.diff(p1, n, None)

         yield self.t('changeset',
                      diff = diff,

-- 
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/424bc551/attachment.pgp


More information about the Mercurial mailing list