Show More
@@ -1372,7 +1372,7 b' class hunk(object):' | |||
|
1372 | 1372 | def _fixnewline(self, lr): |
|
1373 | 1373 | l = lr.readline() |
|
1374 | 1374 | if l.startswith('\ '): |
|
1375 |
diffhelpers.fix |
|
|
1375 | diffhelpers.fixnewline(self.hunk, self.a, self.b) | |
|
1376 | 1376 | else: |
|
1377 | 1377 | lr.push(l) |
|
1378 | 1378 |
@@ -23,7 +23,7 b' def addlines(fp, hunk, lena, lenb, a, b)' | |||
|
23 | 23 | for i in xrange(num): |
|
24 | 24 | s = fp.readline() |
|
25 | 25 | if s == "\\ No newline at end of file\n": |
|
26 |
fix |
|
|
26 | fixnewline(hunk, a, b) | |
|
27 | 27 | continue |
|
28 | 28 | if s == "\n": |
|
29 | 29 | # Some patches may be missing the control char |
@@ -39,7 +39,7 b' def addlines(fp, hunk, lena, lenb, a, b)' | |||
|
39 | 39 | a.append(s) |
|
40 | 40 | return 0 |
|
41 | 41 | |
|
42 |
def fix |
|
|
42 | def fixnewline(hunk, a, b): | |
|
43 | 43 | """Fix up the last lines of a and b when the patch has no newline at EOF""" |
|
44 | 44 | l = hunk[-1] |
|
45 | 45 | # tolerate CRLF in last line |
@@ -55,7 +55,6 b' def fix_newline(hunk, a, b):' | |||
|
55 | 55 | hunk[-1] = hline |
|
56 | 56 | return 0 |
|
57 | 57 | |
|
58 | ||
|
59 | 58 | def testhunk(a, b, bstart): |
|
60 | 59 | """Compare the lines in a with the lines in b |
|
61 | 60 |
General Comments 0
You need to be logged in to leave comments.
Login now