##// END OF EJS Templates
diff: slice over bytes to make sure conditions work normally...
Pulkit Goyal -
r31715:6c80f985 default
parent child Browse files
Show More
@@ -229,7 +229,7 def unidiff(a, ad, b, bd, fn1, fn2, opts
229
229
230 def checknonewline(lines):
230 def checknonewline(lines):
231 for text in lines:
231 for text in lines:
232 if text[-1] != '\n':
232 if text[-1:] != '\n':
233 text += "\n\ No newline at end of file\n"
233 text += "\n\ No newline at end of file\n"
234 yield text
234 yield text
235
235
@@ -737,7 +737,7 class patchfile(object):
737 for x in self.rej:
737 for x in self.rej:
738 for l in x.hunk:
738 for l in x.hunk:
739 lines.append(l)
739 lines.append(l)
740 if l[-1] != '\n':
740 if l[-1:] != '\n':
741 lines.append("\n\ No newline at end of file\n")
741 lines.append("\n\ No newline at end of file\n")
742 self.backend.writerej(self.fname, len(self.rej), self.hunks, lines)
742 self.backend.writerej(self.fname, len(self.rej), self.hunks, lines)
743
743
General Comments 0
You need to be logged in to leave comments. Login now