##// END OF EJS Templates
fix test-mq-eol under --pure (mimic diffhelper.c behaviour)...
Benoit Boissinot -
r10551:f61dced1 stable
parent child Browse files
Show More
@@ -34,11 +34,15 b' def addlines(fp, hunk, lena, lenb, a, b)'
34
34
35 def fix_newline(hunk, a, b):
35 def fix_newline(hunk, a, b):
36 l = hunk[-1]
36 l = hunk[-1]
37 c = l[0]
37 # tolerate CRLF in last line
38 hline = l[:-1]
38 if l.endswith('\r\n'):
39 hline = l[:-2]
40 else:
41 hline = l[:-1]
42 c = hline[0]
39
43
40 if c == " " or c == "+":
44 if c == " " or c == "+":
41 b[-1] = l[1:-1]
45 b[-1] = hline[1:]
42 if c == " " or c == "-":
46 if c == " " or c == "-":
43 a[-1] = hline
47 a[-1] = hline
44 hunk[-1] = hline
48 hunk[-1] = hline
General Comments 0
You need to be logged in to leave comments. Login now