tests/test-diff-newlines
author Greg Onufer <gonufer@jazzhaiku.com>
Wed, 09 Dec 2009 16:56:00 -0800
branchstable
changeset 10135 9a4034b630c4
parent 2248 b914f0557832
permissions -rwxr-xr-x
patch: better handling of sequence of offset patch hunks (issue1941) The built-in patch implementation applied the hunks to the wrong lines of the file if the file in the repo has been modified to skew the patch line numbers and the file contains repetitive sequences of lines.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2248
b914f0557832 fix diffs containing embedded "\r".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     1
#!/bin/sh
b914f0557832 fix diffs containing embedded "\r".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     2
b914f0557832 fix diffs containing embedded "\r".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     3
hg init
b914f0557832 fix diffs containing embedded "\r".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     4
python -c 'print "confuse str.splitlines\nembedded\rnewline"' > a
b914f0557832 fix diffs containing embedded "\r".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     5
hg ci -Ama -d '1 0'
b914f0557832 fix diffs containing embedded "\r".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     6
echo clean diff >> a
b914f0557832 fix diffs containing embedded "\r".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     7
hg ci -mb -d '2 0'
b914f0557832 fix diffs containing embedded "\r".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     8
hg diff -r0 -r1