Fix hgk extension due to 4ec58b157265 refactoring
authorEdouard Gomez <ed.gomez@free.fr>
Wed, 23 Aug 2006 00:19:24 +0200
changeset 3012 abcd6ae3cf5a
parent 3011 6e49bb42620b
child 3013 494521a3f142
Fix hgk extension due to 4ec58b157265 refactoring
hgext/hgk.py
--- 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"""