Mercurial > hg
annotate tests/test-diff-copy-depth @ 9827:4fe9ca519637
mdiff: fix diff -b/B/w on mixed whitespace hunks (issue127)
Previous code was computing hunks then checking if these hunks could be ignored
when taking whitespace/blank-lines options in accounts. This approach is simple
but fails with hunks containing both whitespace and non-whitespace changes, the
whole hunk is emitted while it can be mostly made of whitespace. The new
version normalize the whitespaces before hunk generation, and test for
blank-lines afterwards.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 11 Nov 2009 18:31:42 +0100 |
parents | 204a2ca249b6 |
children |
rev | line source |
---|---|
6489
204a2ca249b6
tests/test-diff-copy-depth: using sh instead of bash
Adrian Buehlmann <adrian@cadifra.com>
parents:
6424
diff
changeset
|
1 #!/bin/sh |
6424 | 2 |
3 for i in aaa zzz; do | |
4 hg init t | |
5 cd t | |
6 | |
7 echo "-- With $i" | |
8 | |
9 touch file | |
10 hg add file | |
11 hg ci -m "Add" | |
12 | |
13 hg cp file $i | |
14 hg ci -m "a -> $i" | |
15 | |
16 hg cp $i other-file | |
17 echo "different" >> $i | |
18 hg ci -m "$i -> other-file" | |
19 | |
20 hg cp other-file somename | |
21 | |
22 echo "Status": | |
23 hg st -C | |
24 echo | |
25 echo "Diff:" | |
26 hg diff -g | |
27 echo | |
28 | |
29 cd .. | |
30 rm -rf t | |
31 done |