author | Augie Fackler <augie@google.com> |
Thu, 29 Jul 2021 17:04:55 -0400 | |
branch | stable |
changeset 47772 | 0bdcb5ef932c |
parent 46266 | e8b0c519dfb3 |
permissions | -rw-r--r-- |
46266
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
1 |
Testing recorded "modified" files for merge commit |
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
2 |
================================================== |
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
3 |
|
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
4 |
#require execbit |
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
5 |
|
42619
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
6 |
This file shows what hg says are "modified" files for a merge commit |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
7 |
(hg log -T {files}), somewhat exhaustively. |
46266
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
8 |
|
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
9 |
This test file shows merges that involves executable bit changing, check test-merge-combination-exec-bytes.t |
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
10 |
|
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
11 |
For merges that involve files contents changing, check test-merge-combination-file-content.t |
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
12 |
|
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
13 |
For testing of multiple corner case, check test-merge-combination-misc.t |
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
14 |
|
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
15 |
Case with multiple or zero merge ancestors, copies/renames, and identical file contents |
e8b0c519dfb3
test: split tests/test-merge-combination.t into multiple parts
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46265
diff
changeset
|
16 |
with different filelog revisions are not currently covered. |
42619
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
17 |
|
46265
8045e4aa366b
test: extract the `genmerges` out of test-merge-combination.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42739
diff
changeset
|
18 |
$ . $TESTDIR/testlib/merge-combination-util.sh |
42619
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
19 |
|
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
20 |
All the merges of executable bit. |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
21 |
|
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
22 |
$ range () { |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
23 |
> max=a |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
24 |
> for i in $@; do |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
25 |
> if [ $i = - ]; then continue; fi |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
26 |
> if [ $i > $max ]; then max=$i; fi |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
27 |
> done |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
28 |
> if [ $max = a ]; then echo f; else echo f x; fi |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
29 |
> } |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
30 |
$ isgood () { case $line in *f*x*) true;; *) false;; esac; } |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
31 |
$ createfile () { |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
32 |
> if [ -f a ] && (([ -x a ] && [ $v = x ]) || (! [ -x a ] && [ $v != x ])) |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
33 |
> then touch $file |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
34 |
> else touch a; if [ $v = x ]; then chmod +x a; else chmod -x a; fi |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
35 |
> fi |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
36 |
> } |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
37 |
|
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
38 |
$ genmerges |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
39 |
fffx : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
40 |
ffxf : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
41 |
ffxx : agree on "" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
42 |
ffx- : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
43 |
ff-x : hg said "", expected "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
44 |
fxff : hg said "", expected "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
45 |
fxfx : hg said "a", expected "" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
46 |
fxf- : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
47 |
fxxf : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
48 |
fxxx : agree on "" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
49 |
fxx- : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
50 |
fx-f : hg said "", expected "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
51 |
fx-x : hg said "", expected "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
52 |
fx-- : hg said "", expected "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
53 |
f-fx : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
54 |
f-xf : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
55 |
f-xx : hg said "", expected "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
56 |
f-x- : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
57 |
f--x : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
58 |
-ffx : agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
59 |
-fxf C: agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
60 |
-fxx C: hg said "", expected "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
61 |
-fx- C: agree on "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
62 |
-f-x : hg said "", expected "a" |
20d0e59be79b
tests: show the files fields of changelogs for many merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
diff
changeset
|
63 |
--fx : agree on "a" |