annotate tests/test-merge-tools.t @ 26755:bb0b955d050d

streamclone: support for producing and consuming stream clone bundles Up to this point, stream clones only existed as a dynamically generated data format produced and consumed during streaming clones. In order to support this efficient cloning format with the clone bundles feature, we need a more formal, on disk representation of the streaming clone data. This patch introduces a new "bundle" type for streaming clones. Unlike existing bundles, it does not contain changegroup data. It does, however, share the same concepts like the 4 byte header which identifies the type of data that follows and the 2 byte abbreviation for compression types (of which only "UN" is currently supported). The new bundle format is essentially the existing stream clone version 1 data format with some headers at the beginning. Content negotiation at stream clone request time checked for repository format/requirements compatibility before initiating a stream clone. We can't do active content negotiation when using clone bundles. So, we put this set of requirements inside the payload so consumers have a built-in mechanism for checking compatibility before reading and applying lots of data. Of course, we will also advertise this requirements set in clone bundles. But that's for another patch. We currently don't have a mechanism to produce and consume this new bundle format. This will be implemented in upcoming patches. It's worth noting that if a legacy client attempts to `hg unbundle` a stream clone bundle (with the "HGS1" header), it will abort with: "unknown bundle version S1," which seems appropriate.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 17 Oct 2015 11:14:52 -0700
parents a1e43e85d294
children da1c706c9a35
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1 test merge-tools configuration - mostly exercising filemerge.py
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
3 $ unset HGMERGE # make sure HGMERGE doesn't interfere with the test
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
4 $ hg init
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
5
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
6 revision 0
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
7
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
8 $ echo "revision 0" > f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
9 $ echo "space" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
10 $ hg commit -Am "revision 0"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
11 adding f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
12
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
13 revision 1
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
14
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
15 $ echo "revision 1" > f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
16 $ echo "space" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
17 $ hg commit -Am "revision 1"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
18 $ hg update 0 > /dev/null
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
19
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
20 revision 2
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
21
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
22 $ echo "revision 2" > f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
23 $ echo "space" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
24 $ hg commit -Am "revision 2"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
25 created new head
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
26 $ hg update 0 > /dev/null
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
27
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
28 revision 3 - simple to merge
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
29
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
30 $ echo "revision 3" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
31 $ hg commit -Am "revision 3"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
32 created new head
22029
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
33
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
34 revision 4 - hard to merge
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
35
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
36 $ hg update 0 > /dev/null
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
37 $ echo "revision 4" > f
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
38 $ hg commit -Am "revision 4"
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
39 created new head
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
40
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
41 $ echo "[merge-tools]" > .hg/hgrc
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
42
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
43 $ beforemerge() {
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
44 > cat .hg/hgrc
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
45 > echo "# hg update -C 1"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
46 > hg update -C 1 > /dev/null
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
47 > }
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
48 $ aftermerge() {
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
49 > echo "# cat f"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
50 > cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
51 > echo "# hg stat"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
52 > hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
53 > rm -f f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
54 > }
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
55
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
56 Tool selection
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
57
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
58 default is internal merge:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
59
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
60 $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
61 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
62 # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
63
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
64 hg merge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
65 override $PATH to ensure hgmerge not visible; use $PYTHON in case we're
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
66 running from a devel copy, not a temp installation
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
67
26168
b907051df5b7 test-merge-tools: include /usr/sbin in path for sysctl (issue4813)
timeless@mozdev.org
parents: 25753
diff changeset
68 $ PATH="$BINDIR:/usr/sbin" $PYTHON "$BINDIR"/hg merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
69 merging f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
70 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
71 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
72 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
73 [1]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
74 $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
75 # cat f
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21552
diff changeset
76 <<<<<<< local: ef83787e2614 - test: revision 1
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
77 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
78 =======
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
79 revision 2
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21552
diff changeset
80 >>>>>>> other: 0185f4e0cf02 - test: revision 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
81 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
82 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
83 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
84 ? f.orig
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
85
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
86 simplest hgrc using false for merge:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
87
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
88 $ echo "false.whatever=" >> .hg/hgrc
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
89 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
90 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
91 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
92 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
93 $ hg merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
94 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
95 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
96 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
97 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
98 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
99 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
100 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
101 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
102 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
103 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
104 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
105 ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
106
24809
32d0d2f38910 tests: fix portability issue with test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 24121
diff changeset
107 #if unix-permissions
32d0d2f38910 tests: fix portability issue with test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 24121
diff changeset
108
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
109 unexecutable file in $PATH shouldn't be found:
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
110
24809
32d0d2f38910 tests: fix portability issue with test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 24121
diff changeset
111 $ echo "echo fail" > false
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
112 $ hg up -qC 1
26168
b907051df5b7 test-merge-tools: include /usr/sbin in path for sysctl (issue4813)
timeless@mozdev.org
parents: 25753
diff changeset
113 $ PATH="`pwd`:$BINDIR:/usr/sbin" $PYTHON "$BINDIR"/hg merge -r 2
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
114 merging f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
115 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
116 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
117 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
118 [1]
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
119 $ rm false
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
120
24809
32d0d2f38910 tests: fix portability issue with test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 24121
diff changeset
121 #endif
32d0d2f38910 tests: fix portability issue with test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 24121
diff changeset
122
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
123 executable directory in $PATH shouldn't be found:
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
124
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
125 $ mkdir false
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
126 $ hg up -qC 1
26168
b907051df5b7 test-merge-tools: include /usr/sbin in path for sysctl (issue4813)
timeless@mozdev.org
parents: 25753
diff changeset
127 $ PATH="`pwd`:$BINDIR:/usr/sbin" $PYTHON "$BINDIR"/hg merge -r 2
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
128 merging f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
129 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
130 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
131 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
132 [1]
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
133 $ rmdir false
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
134
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
135 true with higher .priority gets precedence:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
136
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
137 $ echo "true.priority=1" >> .hg/hgrc
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
138 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
139 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
140 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
141 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
142 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
143 $ hg merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
144 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
145 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
146 (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
147 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
148 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
149 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
150 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
151 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
152 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
153
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
154 unless lowered on command line:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
155
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
156 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
157 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
158 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
159 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
160 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
161 $ hg merge -r 2 --config merge-tools.true.priority=-7
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
162 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
163 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
164 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
165 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
166 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
167 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
168 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
169 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
170 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
171 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
172 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
173 ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
174
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
175 or false set higher on command line:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
176
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
177 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
178 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
179 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
180 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
181 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
182 $ hg merge -r 2 --config merge-tools.false.priority=117
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
183 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
184 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
185 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
186 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
187 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
188 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
189 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
190 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
191 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
192 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
193 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
194 ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
195
26730
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
196 or true set to disabled:
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
197 $ beforemerge
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
198 [merge-tools]
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
199 false.whatever=
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
200 true.priority=1
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
201 # hg update -C 1
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
202 $ hg merge -r 2 --config merge-tools.true.disabled=yes
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
203 merging f
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
204 merging f failed!
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
205 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
206 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
207 [1]
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
208 $ aftermerge
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
209 # cat f
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
210 revision 1
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
211 space
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
212 # hg stat
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
213 M f
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
214 ? f.orig
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
215
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
216 or true.executable not found in PATH:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
217
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
218 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
219 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
220 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
221 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
222 # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
223 $ hg merge -r 2 --config merge-tools.true.executable=nonexistentmergetool
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
224 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
225 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
226 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
227 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
228 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
229 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
230 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
231 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
232 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
233 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
234 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
235 ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
236
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
237 or true.executable with bogus path:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
238
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
239 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
240 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
241 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
242 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
243 # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
244 $ hg merge -r 2 --config merge-tools.true.executable=/nonexistent/mergetool
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
245 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
246 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
247 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
248 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
249 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
250 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
251 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
252 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
253 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
254 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
255 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
256 ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
257
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
258 but true.executable set to cat found in PATH works:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
259
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
260 $ echo "true.executable=cat" >> .hg/hgrc
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
261 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
262 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
263 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
264 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
265 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
266 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
267 $ hg merge -r 2
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
268 merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
269 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
270 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
271 revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
272 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
273 revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
274 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
275 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
276 (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
277 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
278 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
279 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
280 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
281 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
282 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
283
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
284 and true.executable set to cat with path works:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
285
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
286 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
287 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
288 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
289 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
290 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
291 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
292 $ hg merge -r 2 --config merge-tools.true.executable=cat
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
293 merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
294 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
295 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
296 revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
297 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
298 revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
299 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
300 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
301 (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
302 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
303 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
304 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
305 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
306 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
307 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
308
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
309 #if unix-permissions
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
310
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
311 environment variables in true.executable are handled:
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
312
19264
eac114e13b96 tests: avoid writing files to HGTMP
Matt Mackall <mpm@selenic.com>
parents: 18325
diff changeset
313 $ echo 'echo "custom merge tool"' > .hg/merge.sh
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
314 $ beforemerge
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
315 [merge-tools]
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
316 false.whatever=
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
317 true.priority=1
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
318 true.executable=cat
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
319 # hg update -C 1
16967
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
320 $ hg --config merge-tools.true.executable='sh' \
19264
eac114e13b96 tests: avoid writing files to HGTMP
Matt Mackall <mpm@selenic.com>
parents: 18325
diff changeset
321 > --config merge-tools.true.args=.hg/merge.sh \
16967
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
322 > merge -r 2
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
323 merging f
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
324 custom merge tool
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
325 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
326 (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
327 $ aftermerge
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
328 # cat f
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
329 revision 1
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
330 space
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
331 # hg stat
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
332 M f
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
333
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
334 #endif
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
335
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
336 Tool selection and merge-patterns
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
337
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
338 merge-patterns specifies new tool false:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
339
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
340 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
341 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
342 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
343 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
344 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
345 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
346 $ hg merge -r 2 --config merge-patterns.f=false
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
347 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
348 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
349 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
350 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
351 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
352 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
353 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
354 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
355 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
356 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
357 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
358 ? f.orig
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
359
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
360 merge-patterns specifies executable not found in PATH and gets warning:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
361
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
362 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
363 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
364 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
365 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
366 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
367 # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
368 $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
369 couldn't find merge tool true specified for f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
370 merging f
26611
a5ff66e6d77a filemerge: break overall filemerge into separate premerge and merge steps
Siddharth Agarwal <sid0@fb.com>
parents: 26168
diff changeset
371 couldn't find merge tool true specified for f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
372 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
373 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
374 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
375 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
376 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
377 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
378 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
379 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
380 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
381 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
382 ? f.orig
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
383
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
384 merge-patterns specifies executable with bogus path and gets warning:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
385
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
386 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
387 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
388 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
389 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
390 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
391 # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
392 $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexistent/mergetool
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
393 couldn't find merge tool true specified for f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
394 merging f
26611
a5ff66e6d77a filemerge: break overall filemerge into separate premerge and merge steps
Siddharth Agarwal <sid0@fb.com>
parents: 26168
diff changeset
395 couldn't find merge tool true specified for f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
396 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
397 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
398 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
399 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
400 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
401 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
402 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
403 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
404 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
405 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
406 ? f.orig
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
407
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
408 ui.merge overrules priority
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
409
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
410 ui.merge specifies false:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
411
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
412 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
413 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
414 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
415 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
416 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
417 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
418 $ hg merge -r 2 --config ui.merge=false
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
419 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
420 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
421 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
422 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
423 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
424 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
425 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
426 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
427 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
428 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
429 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
430 ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
431
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
432 ui.merge specifies internal:fail:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
433
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
434 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
435 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
436 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
437 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
438 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
439 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
440 $ hg merge -r 2 --config ui.merge=internal:fail
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
441 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
442 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
443 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
444 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
445 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
446 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
447 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
448 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
449 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
450
22706
ad25986c4cd3 filemerge: introduce :x as short version of internal:x merge tool name
Mads Kiilerich <madski@unity3d.com>
parents: 22032
diff changeset
451 ui.merge specifies :local (without internal prefix):
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
452
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
453 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
454 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
455 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
456 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
457 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
458 # hg update -C 1
22706
ad25986c4cd3 filemerge: introduce :x as short version of internal:x merge tool name
Mads Kiilerich <madski@unity3d.com>
parents: 22032
diff changeset
459 $ hg merge -r 2 --config ui.merge=:local
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
460 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
461 (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
462 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
463 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
464 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
465 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
466 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
467 M f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
468
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
469 ui.merge specifies internal:other:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
470
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
471 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
472 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
473 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
474 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
475 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
476 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
477 $ hg merge -r 2 --config ui.merge=internal:other
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
478 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
479 (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
480 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
481 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
482 revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
483 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
484 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
485 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
486
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
487 ui.merge specifies internal:prompt:
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
488
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
489 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
490 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
491 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
492 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
493 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
494 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
495 $ hg merge -r 2 --config ui.merge=internal:prompt
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
496 no tool found to merge f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
497 keep (l)ocal or take (o)ther? l
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
498 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
499 (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
500 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
501 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
502 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
503 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
504 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
505 M f
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
506
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
507 ui.merge specifies internal:dump:
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
508
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
509 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
510 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
511 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
512 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
513 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
514 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
515 $ hg merge -r 2 --config ui.merge=internal:dump
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
516 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
517 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
518 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
519 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
520 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
521 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
522 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
523 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
524 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
525 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
526 ? f.base
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
527 ? f.local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
528 ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
529 ? f.other
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
530
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
531 f.base:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
532
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
533 $ cat f.base
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
534 revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
535 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
536
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
537 f.local:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
538
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
539 $ cat f.local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
540 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
541 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
542
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
543 f.other:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
544
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
545 $ cat f.other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
546 revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
547 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
548 $ rm f.base f.local f.other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
549
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
550 ui.merge specifies internal:other but is overruled by pattern for false:
8901
94319ae527cf test merge-tools internal:dump and internal:prompt
Mads Kiilerich <mads@kiilerich.com>
parents: 8674
diff changeset
551
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
552 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
553 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
554 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
555 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
556 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
557 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
558 $ hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
559 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
560 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
561 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
562 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
563 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
564 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
565 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
566 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
567 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
568 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
569 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
570 ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
571
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
572 Premerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
573
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
574 ui.merge specifies internal:other but is overruled by --tool=false
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
575
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
576 $ beforemerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
577 [merge-tools]
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
578 false.whatever=
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
579 true.priority=1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
580 true.executable=cat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
581 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
582 $ hg merge -r 2 --config ui.merge=internal:other --tool=false
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
583 merging f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
584 merging f failed!
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
585 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
586 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
587 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
588 $ aftermerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
589 # cat f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
590 revision 1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
591 space
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
592 # hg stat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
593 M f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
594 ? f.orig
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
595
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
596 HGMERGE specifies internal:other but is overruled by --tool=false
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
597
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
598 $ HGMERGE=internal:other ; export HGMERGE
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
599 $ beforemerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
600 [merge-tools]
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
601 false.whatever=
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
602 true.priority=1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
603 true.executable=cat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
604 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
605 $ hg merge -r 2 --tool=false
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
606 merging f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
607 merging f failed!
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
608 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
609 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
610 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
611 $ aftermerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
612 # cat f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
613 revision 1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
614 space
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
615 # hg stat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
616 M f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
617 ? f.orig
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
618
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
619 $ unset HGMERGE # make sure HGMERGE doesn't interfere with remaining tests
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
620
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
621 update is a merge ...
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
622
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
623 (this also tests that files reverted with '--rev REV' are treated as
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
624 "modified", even if none of mode, size and timestamp of them isn't
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
625 changed on the filesystem (see also issue4583))
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
626
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
627 $ cat >> $HGRCPATH <<EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
628 > [fakedirstatewritetime]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
629 > # emulate invoking dirstate.write() via repo.status()
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
630 > # at 2000-01-01 00:00
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
631 > fakenow = 200001010000
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
632 > EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
633
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
634 $ beforemerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
635 [merge-tools]
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
636 false.whatever=
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
637 true.priority=1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
638 true.executable=cat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
639 # hg update -C 1
24121
9d0b6ef92eb2 test-merge-tools: fix flaky test by avoiding debugsetparents
Martin von Zweigbergk <martinvonz@google.com>
parents: 22707
diff changeset
640 $ hg update -q 0
24843
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
641 $ f -s f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
642 f: size=17
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
643 $ touch -t 200001010000 f
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
644 $ hg debugrebuildstate
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
645 $ cat >> $HGRCPATH <<EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
646 > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
647 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
648 > EOF
24121
9d0b6ef92eb2 test-merge-tools: fix flaky test by avoiding debugsetparents
Martin von Zweigbergk <martinvonz@google.com>
parents: 22707
diff changeset
649 $ hg revert -q -r 1 .
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
650 $ cat >> $HGRCPATH <<EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
651 > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
652 > fakedirstatewritetime = !
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
653 > EOF
24843
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
654 $ f -s f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
655 f: size=17
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
656 $ touch -t 200001010000 f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
657 $ hg status f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
658 M f
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
659 $ hg update -r 2
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
660 merging f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
661 revision 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
662 space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
663 revision 0
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
664 space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
665 revision 2
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
666 space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
667 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
668 $ aftermerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
669 # cat f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
670 revision 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
671 space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
672 # hg stat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
673 M f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
674
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
675 update should also have --tool
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
676
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
677 $ beforemerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
678 [merge-tools]
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
679 false.whatever=
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
680 true.priority=1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
681 true.executable=cat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
682 # hg update -C 1
24121
9d0b6ef92eb2 test-merge-tools: fix flaky test by avoiding debugsetparents
Martin von Zweigbergk <martinvonz@google.com>
parents: 22707
diff changeset
683 $ hg update -q 0
24843
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
684 $ f -s f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
685 f: size=17
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
686 $ touch -t 200001010000 f
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
687 $ hg debugrebuildstate
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
688 $ cat >> $HGRCPATH <<EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
689 > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
690 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
691 > EOF
24121
9d0b6ef92eb2 test-merge-tools: fix flaky test by avoiding debugsetparents
Martin von Zweigbergk <martinvonz@google.com>
parents: 22707
diff changeset
692 $ hg revert -q -r 1 .
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
693 $ cat >> $HGRCPATH <<EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
694 > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
695 > fakedirstatewritetime = !
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
696 > EOF
24843
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
697 $ f -s f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
698 f: size=17
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
699 $ touch -t 200001010000 f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
700 $ hg status f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
701 M f
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
702 $ hg update -r 2 --tool false
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
703 merging f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
704 merging f failed!
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
705 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
706 use 'hg resolve' to retry unresolved file merges
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
707 [1]
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
708 $ aftermerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
709 # cat f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
710 revision 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
711 space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
712 # hg stat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
713 M f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
714 ? f.orig
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
715
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
716 Default is silent simplemerge:
8901
94319ae527cf test merge-tools internal:dump and internal:prompt
Mads Kiilerich <mads@kiilerich.com>
parents: 8674
diff changeset
717
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
718 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
719 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
720 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
721 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
722 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
723 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
724 $ hg merge -r 3
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
725 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
726 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
727 (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
728 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
729 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
730 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
731 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
732 revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
733 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
734 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
735
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
736 .premerge=True is same:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
737
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
738 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
739 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
740 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
741 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
742 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
743 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
744 $ hg merge -r 3 --config merge-tools.true.premerge=True
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
745 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
746 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
747 (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
748 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
749 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
750 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
751 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
752 revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
753 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
754 M f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
755
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
756 .premerge=False executes merge-tool:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
757
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
758 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
759 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
760 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
761 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
762 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
763 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
764 $ hg merge -r 3 --config merge-tools.true.premerge=False
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
765 merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
766 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
767 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
768 revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
769 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
770 revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
771 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
772 revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
773 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
774 (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
775 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
776 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
777 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
778 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
779 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
780 M f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
781
22030
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
782 premerge=keep keeps conflict markers in:
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
783
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
784 $ beforemerge
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
785 [merge-tools]
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
786 false.whatever=
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
787 true.priority=1
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
788 true.executable=cat
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
789 # hg update -C 1
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
790 $ hg merge -r 4 --config merge-tools.true.premerge=keep
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
791 merging f
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
792 <<<<<<< local: ef83787e2614 - test: revision 1
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
793 revision 1
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
794 space
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
795 =======
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
796 revision 4
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
797 >>>>>>> other: 81448d39c9a0 - test: revision 4
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
798 revision 0
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
799 space
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
800 revision 4
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
801 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
802 (branch merge, don't forget to commit)
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
803 $ aftermerge
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
804 # cat f
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
805 <<<<<<< local: ef83787e2614 - test: revision 1
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
806 revision 1
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
807 space
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
808 =======
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
809 revision 4
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
810 >>>>>>> other: 81448d39c9a0 - test: revision 4
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
811 # hg stat
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
812 M f
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
813
22032
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
814 premerge=keep-merge3 keeps conflict markers with base content:
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
815
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
816 $ beforemerge
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
817 [merge-tools]
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
818 false.whatever=
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
819 true.priority=1
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
820 true.executable=cat
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
821 # hg update -C 1
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
822 $ hg merge -r 4 --config merge-tools.true.premerge=keep-merge3
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
823 merging f
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
824 <<<<<<< local: ef83787e2614 - test: revision 1
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
825 revision 1
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
826 space
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
827 ||||||| base
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
828 revision 0
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
829 space
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
830 =======
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
831 revision 4
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
832 >>>>>>> other: 81448d39c9a0 - test: revision 4
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
833 revision 0
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
834 space
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
835 revision 4
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
836 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
837 (branch merge, don't forget to commit)
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
838 $ aftermerge
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
839 # cat f
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
840 <<<<<<< local: ef83787e2614 - test: revision 1
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
841 revision 1
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
842 space
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
843 ||||||| base
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
844 revision 0
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
845 space
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
846 =======
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
847 revision 4
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
848 >>>>>>> other: 81448d39c9a0 - test: revision 4
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
849 # hg stat
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
850 M f
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
851
22030
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
852
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
853 Tool execution
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
854
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
855 set tools.args explicit to include $base $local $other $output:
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
856
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
857 $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
858 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
859 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
860 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
861 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
862 # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
863 $ hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
864 > | sed 's,==> .* <==,==> ... <==,g'
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
865 merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
866 ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
867 revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
868 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
869
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
870 ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
871 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
872 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
873
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
874 ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
875 revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
876 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
877
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
878 ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
879 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
880 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
881 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
882 (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
883 $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
884 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
885 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
886 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
887 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
888 M f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
889
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
890 Merge with "echo mergeresult > $local":
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
891
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
892 $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
893 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
894 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
895 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
896 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
897 # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
898 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
899 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
900 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
901 (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
902 $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
903 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
904 mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
905 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
906 M f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
907
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
908 - and $local is the file f:
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
909
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
910 $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
911 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
912 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
913 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
914 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
915 # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
916 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
917 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
918 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
919 (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
920 $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
921 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
922 mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
923 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
924 M f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
925
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
926 Merge with "echo mergeresult > $output" - the variable is a bit magic:
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
927
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
928 $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
929 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
930 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
931 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
932 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
933 # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
934 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
935 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
936 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
937 (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
938 $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
939 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
940 mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
941 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
942 M f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
943
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
944 Merge using tool with a path that must be quoted:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
945
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
946 $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
947 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
948 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
949 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
950 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
951 # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
952 $ cat <<EOF > 'my merge tool'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
953 > cat "\$1" "\$2" "\$3" > "\$4"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
954 > EOF
16967
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
955 $ hg --config merge-tools.true.executable='sh' \
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
956 > --config merge-tools.true.args='"./my merge tool" $base $local $other $output' \
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
957 > merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
958 merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
959 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
960 (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
961 $ rm -f 'my merge tool'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
962 $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
963 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
964 revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
965 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
966 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
967 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
968 revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
969 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
970 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
971 M f
10775
c52057614c72 Tests with spaces in paths
Mads Kiilerich <mads@kiilerich.com>
parents: 10282
diff changeset
972
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
973 Issue3581: Merging a filename that needs to be quoted
17902
195ad823b5d5 tests: fix test for issue3581 for vfat on Linux
Matt Mackall <mpm@selenic.com>
parents: 17901
diff changeset
974 (This test doesn't work on Windows filesystems even on Linux, so check
195ad823b5d5 tests: fix test for issue3581 for vfat on Linux
Matt Mackall <mpm@selenic.com>
parents: 17901
diff changeset
975 for Unix-like permission)
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
976
17902
195ad823b5d5 tests: fix test for issue3581 for vfat on Linux
Matt Mackall <mpm@selenic.com>
parents: 17901
diff changeset
977 #if unix-permissions
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
978 $ beforemerge
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
979 [merge-tools]
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
980 false.whatever=
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
981 true.priority=1
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
982 true.executable=cat
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
983 # hg update -C 1
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
984 $ echo "revision 5" > '"; exit 1; echo "'
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
985 $ hg commit -Am "revision 5"
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
986 adding "; exit 1; echo "
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
987 warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "'
22029
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
988 $ hg update -C 1 > /dev/null
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
989 $ echo "revision 6" > '"; exit 1; echo "'
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
990 $ hg commit -Am "revision 6"
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
991 adding "; exit 1; echo "
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
992 warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "'
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
993 created new head
22029
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
994 $ hg merge --config merge-tools.true.executable="true" -r 5
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
995 merging "; exit 1; echo "
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
996 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
997 (branch merge, don't forget to commit)
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
998 $ hg update -C 1 > /dev/null
17901
a19046744e4e filemerge: only run test for issue3581 on non-windows environments
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17885
diff changeset
999 #endif
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
1000
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1001 Merge post-processing
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
1002
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1003 cat is a bad merge-tool and doesn't change:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
1004
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
1005 $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1006 [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1007 false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1008 true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1009 true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1010 # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
1011 $ hg merge -y -r 2 --config merge-tools.true.checkchanged=1
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
1012 merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1013 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1014 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1015 revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1016 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1017 revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1018 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1019 output file f appears unchanged
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1020 was merge successful (yn)? n
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1021 merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1022 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1023 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
1024 [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
1025 $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1026 # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1027 revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1028 space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1029 # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1030 M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
1031 ? f.orig
18256
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1032
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1033 #if symlink
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1034
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1035 internal merge cannot handle symlinks and shouldn't try:
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1036
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1037 $ hg update -q -C 1
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1038 $ rm f
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1039 $ ln -s symlink f
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1040 $ hg commit -qm 'f is symlink'
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1041 $ hg merge -r 2 --tool internal:merge
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1042 merging f
22707
38e0363dcbe0 filemerge: switch the default name for internal tools from internal:x to :x
Mads Kiilerich <madski@unity3d.com>
parents: 22706
diff changeset
1043 warning: internal :merge cannot merge symlinks for f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
1044 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
18256
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1045 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1046 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1047 [1]
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1048
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
1049 #endif