[PATCH] Port hgweb_mod.py to latest mdiff.unidiff() API

Rocco Rutte pdmef at gmx.net
Sat Nov 3 10:39:38 CDT 2007


1 files changed, 5 insertions(+), 3 deletions(-)
mercurial/hgweb/hgweb_mod.py |    8 +++++---


# HG changeset patch
# User Rocco Rutte <pdmef at gmx.net>
# Date 1194104367 -3600
# Node ID 7d46ada4a87d836a04cc1a0b016c2bb50e7d28bf
# Parent  8bc73135c4532490f619502b57e95fc19206c609
Port hgweb_mod.py to latest mdiff.unidiff() API.
These changes were missing in changeset e5eedd74e70f.

diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -196,17 +196,19 @@ class hgweb(object):
         for f in modified:
             to = c1.filectx(f).data()
             tn = c2.filectx(f).data()
-            yield diffblock(mdiff.unidiff(to, date1, tn, date2, f,
+            yield diffblock(mdiff.unidiff(to, date1, tn, date2, f, f,
                                           opts=diffopts), f, tn)
         for f in added:
             to = None
             tn = c2.filectx(f).data()
-            yield diffblock(mdiff.unidiff(to, date1, tn, date2, f,
+            yield diffblock(mdiff.unidiff(to, date1, tn, date2,
+                                          "/dev/null", f,
                                           opts=diffopts), f, tn)
         for f in removed:
             to = c1.filectx(f).data()
             tn = None
-            yield diffblock(mdiff.unidiff(to, date1, tn, date2, f,
+            yield diffblock(mdiff.unidiff(to, date1, tn, date2,
+                                          f, "/dev/null",
                                           opts=diffopts), f, tn)
 
     def changelog(self, ctx, shortlog=False):


More information about the Mercurial-devel mailing list