| 1 |
Testing recorded "modified" files for merge commit |
| 2 |
================================================== |
| 3 |
|
| 4 |
#require execbit |
| 5 |
|
| 6 |
This file shows what hg says are "modified" files for a merge commit |
| 7 |
(hg log -T {files}), somewhat exhaustively. |
| 8 |
|
| 9 |
This test file shows merges that involves executable bit changing, check test-merge-combination-exec-bytes.t |
| 10 |
|
| 11 |
For merges that involve files contents changing, check test-merge-combination-file-content.t |
| 12 |
|
| 13 |
For testing of multiple corner case, check test-merge-combination-misc.t |
| 14 |
|
| 15 |
Case with multiple or zero merge ancestors, copies/renames, and identical file contents |
| 16 |
with different filelog revisions are not currently covered. |
| 17 |
|
| 18 |
$ . $TESTDIR/testlib/merge-combination-util.sh |
| 19 |
|
| 20 |
All the merges of executable bit. |
| 21 |
|
| 22 |
$ range () { |
| 23 |
> max=a |
| 24 |
> for i in $@; do |
| 25 |
> if [ $i = - ]; then continue; fi |
| 26 |
> if [ $i > $max ]; then max=$i; fi |
| 27 |
> done |
| 28 |
> if [ $max = a ]; then echo f; else echo f x; fi |
| 29 |
> } |
| 30 |
$ isgood () { case $line in *f*x*) true;; *) false;; esac; } |
| 31 |
$ createfile () { |
| 32 |
> if [ -f a ] && (([ -x a ] && [ $v = x ]) || (! [ -x a ] && [ $v != x ])) |
| 33 |
> then touch $file |
| 34 |
> else touch a; if [ $v = x ]; then chmod +x a; else chmod -x a; fi |
| 35 |
> fi |
| 36 |
> } |
| 37 |
|
| 38 |
$ genmerges |
| 39 |
fffx : agree on "a" |
| 40 |
ffxf : agree on "a" |
| 41 |
ffxx : agree on "" |
| 42 |
ffx- : agree on "a" |
| 43 |
ff-x : hg said "", expected "a" |
| 44 |
fxff : hg said "", expected "a" |
| 45 |
fxfx : hg said "a", expected "" |
| 46 |
fxf- : agree on "a" |
| 47 |
fxxf : agree on "a" |
| 48 |
fxxx : agree on "" |
| 49 |
fxx- : agree on "a" |
| 50 |
fx-f : hg said "", expected "a" |
| 51 |
fx-x : hg said "", expected "a" |
| 52 |
fx-- : hg said "", expected "a" |
| 53 |
f-fx : agree on "a" |
| 54 |
f-xf : agree on "a" |
| 55 |
f-xx : hg said "", expected "a" |
| 56 |
f-x- : agree on "a" |
| 57 |
f--x : agree on "a" |
| 58 |
-ffx : agree on "a" |
| 59 |
-fxf C: agree on "a" |
| 60 |
-fxx C: hg said "", expected "a" |
| 61 |
-fx- C: agree on "a" |
| 62 |
-f-x : hg said "", expected "a" |
| 63 |
--fx : agree on "a" |