##// END OF EJS Templates
hg diff: fix missing final newline bug
mpm@selenic.com -
r170:e6c621a8 default
parent child Browse files
Show More
@@ -7,6 +7,11 b' def unidiff(a, ad, b, bd, fn):'
7 7 a = a.splitlines(1)
8 8 b = b.splitlines(1)
9 9 l = list(difflib.unified_diff(a, b, "a/" + fn, "b/" + fn, ad, bd))
10
11 for ln in xrange(len(l)):
12 if l[ln][-1] != '\n':
13 l[ln] += "\n\ No newline at end of file\n"
14
10 15 return "".join(l)
11 16
12 17 def textdiff(a, b):
General Comments 0
You need to be logged in to leave comments. Login now