Fixed contrib/hgdiff script to pass diffopts in the new format.
authorThomas Arendsen Hein <thomas@intevation.de>
Sun, 15 Oct 2006 20:56:38 +0200
changeset 3398 0f308690bda8
parent 3397 f0415b61949d
child 3399 5dbb3a991bbf
Fixed contrib/hgdiff script to pass diffopts in the new format.
contrib/hgdiff
--- a/contrib/hgdiff	Sun Oct 15 16:35:47 2006 +0200
+++ b/contrib/hgdiff	Sun Oct 15 20:56:38 2006 +0200
@@ -5,9 +5,9 @@
 import re
 from optparse import OptionParser
 from mercurial.bdiff import bdiff, blocks
-from mercurial.mdiff import bunidiff
+from mercurial.mdiff import bunidiff, diffopts
 
-VERSION="0.2"
+VERSION="0.3"
 usage = "usage: %prog [options] file1 file2"
 parser = OptionParser(usage=usage)
 
@@ -57,9 +57,10 @@
         if options.difflib:
             l = difflib.unified_diff(l1, l2, file1, file2)
         else:
-            l = bunidiff(t1, t2, l1, l2, file1, file2, context=options.context,
-                     showfunc=options.show_c_function,
-                     ignorews=options.ignore_all_space)
+            l = bunidiff(t1, t2, l1, l2, file1, file2,
+                         diffopts(context=options.context,
+                                  showfunc=options.show_c_function,
+                                  ignorews=options.ignore_all_space))
     for x in l:
         if x[-1] != '\n':
             x += "\n\ No newline at end of file\n"