##// END OF EJS Templates
Fixed contrib/hgdiff script to pass diffopts in the new format.
Thomas Arendsen Hein -
r3398:0f308690 default
parent child Browse files
Show More
@@ -5,9 +5,9 b' import difflib'
5 import re
5 import re
6 from optparse import OptionParser
6 from optparse import OptionParser
7 from mercurial.bdiff import bdiff, blocks
7 from mercurial.bdiff import bdiff, blocks
8 from mercurial.mdiff import bunidiff
8 from mercurial.mdiff import bunidiff, diffopts
9
9
10 VERSION="0.2"
10 VERSION="0.3"
11 usage = "usage: %prog [options] file1 file2"
11 usage = "usage: %prog [options] file1 file2"
12 parser = OptionParser(usage=usage)
12 parser = OptionParser(usage=usage)
13
13
@@ -57,9 +57,10 b' def diff_files(file1, file2):'
57 if options.difflib:
57 if options.difflib:
58 l = difflib.unified_diff(l1, l2, file1, file2)
58 l = difflib.unified_diff(l1, l2, file1, file2)
59 else:
59 else:
60 l = bunidiff(t1, t2, l1, l2, file1, file2, context=options.context,
60 l = bunidiff(t1, t2, l1, l2, file1, file2,
61 showfunc=options.show_c_function,
61 diffopts(context=options.context,
62 ignorews=options.ignore_all_space)
62 showfunc=options.show_c_function,
63 ignorews=options.ignore_all_space))
63 for x in l:
64 for x in l:
64 if x[-1] != '\n':
65 if x[-1] != '\n':
65 x += "\n\ No newline at end of file\n"
66 x += "\n\ No newline at end of file\n"
General Comments 0
You need to be logged in to leave comments. Login now