##// END OF EJS Templates
crecord: properly handle files with No newline at eof (issue5268)...
timeless -
r29862:e7766022 stable
parent child Browse files
Show More
@@ -387,7 +387,7 b' class uihunk(patchnode):'
387
387
388 contextlen = (len(self.before) + len(self.after) +
388 contextlen = (len(self.before) + len(self.after) +
389 removedconvertedtocontext)
389 removedconvertedtocontext)
390 if self.after and self.after[-1] == '\\ no newline at end of file\n':
390 if self.after and self.after[-1] == '\\ No newline at end of file\n':
391 contextlen -= 1
391 contextlen -= 1
392 fromlen = contextlen + self.removed
392 fromlen = contextlen + self.removed
393 tolen = contextlen + self.added
393 tolen = contextlen + self.added
@@ -9,6 +9,21 b' Set up a repo'
9 > crecordtest = testModeCommands
9 > crecordtest = testModeCommands
10 > EOF
10 > EOF
11
11
12 Record with noeol at eof (issue5268)
13 $ hg init noeol
14 $ cd noeol
15 $ printf '0' > a
16 $ printf '0\n' > b
17 $ hg ci -Aqm initial
18 $ printf '1\n0' > a
19 $ printf '1\n0\n' > b
20 $ cat <<EOF >testModeCommands
21 > c
22 > EOF
23 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "add hunks" -d "0 0"
24 $ cd ..
25
26 Normal repo
12 $ hg init a
27 $ hg init a
13 $ cd a
28 $ cd a
14
29
General Comments 0
You need to be logged in to leave comments. Login now