changeset 3012:abcd6ae3cf5a

Fix hgk extension due to 4ec58b157265 refactoring
author Edouard Gomez <ed.gomez@free.fr>
date Wed, 23 Aug 2006 00:19:24 +0200
parents 6e49bb42620b
children 494521a3f142
files hgext/hgk.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/hgk.py	Wed Aug 23 08:42:21 2006 -0700
+++ b/hgext/hgk.py	Wed Aug 23 00:19:24 2006 +0200
@@ -46,18 +46,20 @@
         if f in mmap:
             to = repo.file(f).read(mmap[f])
         tn = read(f)
+        opts = mdiff.diffopts()
+        opts.text = text
         fp.write("diff --git a/%s b/%s\n" % (f, f))
-        fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, text=text))
+        fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, opts=opts))
     for f in added:
         to = None
         tn = read(f)
         fp.write("diff --git /dev/null b/%s\n" % (f))
-        fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, text=text))
+        fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, opts=opts))
     for f in removed:
         to = repo.file(f).read(mmap[f])
         tn = None
         fp.write("diff --git a/%s /dev/null\n" % (f))
-        fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, text=text))
+        fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, opts=opts))
 
 def difftree(ui, repo, node1=None, node2=None, **opts):
     """diff trees from two commits"""