diff mercurial/commands.py @ 1637:3b1b44b917f4

Add new bdiff based unidiff generation.
author mason@suse.com
date Tue, 24 Jan 2006 15:02:10 +1300
parents f49f602fae92
children 80640ef93aec
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Jan 24 14:49:19 2006 +1300
+++ b/mercurial/commands.py	Tue Jan 24 15:02:10 2006 +1300
@@ -295,20 +295,26 @@
     mmap = repo.manifest.read(change[0])
     date1 = util.datestr(change[2])
 
+    diffopts = ui.diffopts()
+    showfunc = diffopts['showfunc']
+    ignorews = diffopts['ignorews']
     for f in modified:
         to = None
         if f in mmap:
             to = repo.file(f).read(mmap[f])
         tn = read(f)
-        fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text))
+        fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text,
+                               showfunc=showfunc, ignorews=ignorews))
     for f in added:
         to = None
         tn = read(f)
-        fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text))
+        fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text,
+                               showfunc=showfunc, ignorews=ignorews))
     for f in removed:
         to = repo.file(f).read(mmap[f])
         tn = None
-        fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text))
+        fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text,
+                               showfunc=showfunc, ignorews=ignorews))
 
 def trimuser(ui, name, rev, revcache):
     """trim the name of the user who committed a change"""