##// END OF EJS Templates
tests: add newfilenode test case in test-merge-changedelete.t
Pulkit Goyal -
r46191:64461b43 default
parent child Browse files
Show More
@@ -1,1096 +1,1108 b''
1 #testcases newfilenode old
2
3 #if newfilenode
4 Enable the config option
5 ------------------------
6
7 $ cat >> $HGRCPATH <<EOF
8 > [experimental]
9 > merge-track-salvaged = True
10 > EOF
11 #endif
12
1 Tests for change/delete conflicts, including:
13 Tests for change/delete conflicts, including:
2 b5605d88dc27: Make ui.prompt repeat on "unrecognized response" again
14 b5605d88dc27: Make ui.prompt repeat on "unrecognized response" again
3 (issue897)
15 (issue897)
4
16
5 840e2b315c1f: Fix misleading error and prompts during update/merge
17 840e2b315c1f: Fix misleading error and prompts during update/merge
6 (issue556)
18 (issue556)
7
19
8 Make sure HGMERGE doesn't interfere with the test
20 Make sure HGMERGE doesn't interfere with the test
9 $ unset HGMERGE
21 $ unset HGMERGE
10
22
11 $ status() {
23 $ status() {
12 > echo "--- status ---"
24 > echo "--- status ---"
13 > hg st -A file1 file2 file3
25 > hg st -A file1 file2 file3
14 > echo "--- resolve --list ---"
26 > echo "--- resolve --list ---"
15 > hg resolve --list file1 file2 file3
27 > hg resolve --list file1 file2 file3
16 > echo "--- debugmergestate ---"
28 > echo "--- debugmergestate ---"
17 > hg debugmergestate
29 > hg debugmergestate
18 > for file in file1 file2 file3; do
30 > for file in file1 file2 file3; do
19 > if [ -f $file ]; then
31 > if [ -f $file ]; then
20 > echo "--- $file ---"
32 > echo "--- $file ---"
21 > cat $file
33 > cat $file
22 > else
34 > else
23 > echo "*** $file does not exist"
35 > echo "*** $file does not exist"
24 > fi
36 > fi
25 > done
37 > done
26 > }
38 > }
27
39
28 $ hg init repo
40 $ hg init repo
29 $ cd repo
41 $ cd repo
30
42
31 $ echo 1 > file1
43 $ echo 1 > file1
32 $ echo 2 > file2
44 $ echo 2 > file2
33 $ echo 3 > file3
45 $ echo 3 > file3
34 $ hg ci -Am 'added files'
46 $ hg ci -Am 'added files'
35 adding file1
47 adding file1
36 adding file2
48 adding file2
37 adding file3
49 adding file3
38
50
39 $ hg rm file1
51 $ hg rm file1
40 $ echo changed >> file2
52 $ echo changed >> file2
41 $ echo changed1 >> file3
53 $ echo changed1 >> file3
42 $ hg ci -m 'removed file1, changed file2, changed file3'
54 $ hg ci -m 'removed file1, changed file2, changed file3'
43
55
44 $ hg co 0
56 $ hg co 0
45 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
46
58
47 $ echo changed >> file1
59 $ echo changed >> file1
48 $ hg rm file2
60 $ hg rm file2
49 $ echo changed2 >> file3
61 $ echo changed2 >> file3
50 $ hg ci -m 'changed file1, removed file2, changed file3'
62 $ hg ci -m 'changed file1, removed file2, changed file3'
51 created new head
63 created new head
52
64
53
65
54 Non-interactive merge:
66 Non-interactive merge:
55
67
56 $ hg merge -y
68 $ hg merge -y
57 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
69 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
58 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
70 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
59 What do you want to do? u
71 What do you want to do? u
60 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
72 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
61 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
73 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
62 What do you want to do? u
74 What do you want to do? u
63 merging file3
75 merging file3
64 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
76 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
65 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
77 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
66 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
78 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
67 [1]
79 [1]
68
80
69 $ status
81 $ status
70 --- status ---
82 --- status ---
71 M file2
83 M file2
72 M file3
84 M file3
73 C file1
85 C file1
74 --- resolve --list ---
86 --- resolve --list ---
75 U file1
87 U file1
76 U file2
88 U file2
77 U file3
89 U file3
78 --- debugmergestate ---
90 --- debugmergestate ---
79 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
91 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
80 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
92 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
81 file: file1 (state "u")
93 file: file1 (state "u")
82 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
94 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
83 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
95 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
84 other path: file1 (node 0000000000000000000000000000000000000000)
96 other path: file1 (node 0000000000000000000000000000000000000000)
85 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
97 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
86 extra: merge-removal-candidate = yes
98 extra: merge-removal-candidate = yes
87 file: file2 (state "u")
99 file: file2 (state "u")
88 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
100 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
89 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
101 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
90 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
102 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
91 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
103 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
92 extra: merge-removal-candidate = yes
104 extra: merge-removal-candidate = yes
93 file: file3 (state "u")
105 file: file3 (state "u")
94 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
106 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
95 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
107 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
96 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
108 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
97 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
109 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
98 --- file1 ---
110 --- file1 ---
99 1
111 1
100 changed
112 changed
101 --- file2 ---
113 --- file2 ---
102 2
114 2
103 changed
115 changed
104 --- file3 ---
116 --- file3 ---
105 3
117 3
106 <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
118 <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
107 changed2
119 changed2
108 =======
120 =======
109 changed1
121 changed1
110 >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
122 >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
111
123
112
124
113 Interactive merge:
125 Interactive merge:
114
126
115 $ hg co -C
127 $ hg co -C
116 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
128 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
117 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
129 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
118 1 other heads for branch "default"
130 1 other heads for branch "default"
119
131
120 $ hg merge --config ui.interactive=true <<EOF
132 $ hg merge --config ui.interactive=true <<EOF
121 > c
133 > c
122 > d
134 > d
123 > EOF
135 > EOF
124 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
136 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
125 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
137 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
126 What do you want to do? c
138 What do you want to do? c
127 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
139 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
128 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
140 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
129 What do you want to do? d
141 What do you want to do? d
130 merging file3
142 merging file3
131 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
143 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
132 0 files updated, 2 files merged, 0 files removed, 1 files unresolved
144 0 files updated, 2 files merged, 0 files removed, 1 files unresolved
133 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
145 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
134 [1]
146 [1]
135
147
136 $ status
148 $ status
137 --- status ---
149 --- status ---
138 file2: * (glob)
150 file2: * (glob)
139 M file3
151 M file3
140 C file1
152 C file1
141 --- resolve --list ---
153 --- resolve --list ---
142 R file1
154 R file1
143 R file2
155 R file2
144 U file3
156 U file3
145 --- debugmergestate ---
157 --- debugmergestate ---
146 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
158 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
147 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
159 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
148 file: file1 (state "r")
160 file: file1 (state "r")
149 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
161 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
150 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
162 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
151 other path: file1 (node 0000000000000000000000000000000000000000)
163 other path: file1 (node 0000000000000000000000000000000000000000)
152 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
164 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
153 extra: merge-removal-candidate = yes
165 extra: merge-removal-candidate = yes
154 file: file2 (state "r")
166 file: file2 (state "r")
155 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
167 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
156 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
168 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
157 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
169 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
158 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
170 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
159 extra: merge-removal-candidate = yes
171 extra: merge-removal-candidate = yes
160 file: file3 (state "u")
172 file: file3 (state "u")
161 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
173 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
162 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
174 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
163 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
175 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
164 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
176 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
165 --- file1 ---
177 --- file1 ---
166 1
178 1
167 changed
179 changed
168 *** file2 does not exist
180 *** file2 does not exist
169 --- file3 ---
181 --- file3 ---
170 3
182 3
171 <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
183 <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
172 changed2
184 changed2
173 =======
185 =======
174 changed1
186 changed1
175 >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
187 >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
176
188
177
189
178 Interactive merge with bad input:
190 Interactive merge with bad input:
179
191
180 $ hg co -C
192 $ hg co -C
181 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
193 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
182 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
194 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
183 1 other heads for branch "default"
195 1 other heads for branch "default"
184
196
185 $ hg merge --config ui.interactive=true <<EOF
197 $ hg merge --config ui.interactive=true <<EOF
186 > foo
198 > foo
187 > bar
199 > bar
188 > d
200 > d
189 > baz
201 > baz
190 > c
202 > c
191 > EOF
203 > EOF
192 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
204 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
193 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
205 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
194 What do you want to do? foo
206 What do you want to do? foo
195 unrecognized response
207 unrecognized response
196 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
208 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
197 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
209 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
198 What do you want to do? bar
210 What do you want to do? bar
199 unrecognized response
211 unrecognized response
200 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
212 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
201 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
213 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
202 What do you want to do? d
214 What do you want to do? d
203 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
215 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
204 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
216 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
205 What do you want to do? baz
217 What do you want to do? baz
206 unrecognized response
218 unrecognized response
207 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
219 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
208 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
220 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
209 What do you want to do? c
221 What do you want to do? c
210 merging file3
222 merging file3
211 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
223 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
212 0 files updated, 1 files merged, 1 files removed, 1 files unresolved
224 0 files updated, 1 files merged, 1 files removed, 1 files unresolved
213 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
225 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
214 [1]
226 [1]
215
227
216 $ status
228 $ status
217 --- status ---
229 --- status ---
218 M file2
230 M file2
219 M file3
231 M file3
220 R file1
232 R file1
221 --- resolve --list ---
233 --- resolve --list ---
222 R file1
234 R file1
223 R file2
235 R file2
224 U file3
236 U file3
225 --- debugmergestate ---
237 --- debugmergestate ---
226 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
238 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
227 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
239 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
228 file: file1 (state "r")
240 file: file1 (state "r")
229 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
241 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
230 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
242 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
231 other path: file1 (node 0000000000000000000000000000000000000000)
243 other path: file1 (node 0000000000000000000000000000000000000000)
232 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
244 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
233 extra: merge-removal-candidate = yes
245 extra: merge-removal-candidate = yes
234 file: file2 (state "r")
246 file: file2 (state "r")
235 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
247 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
236 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
248 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
237 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
249 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
238 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
250 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
239 extra: merge-removal-candidate = yes
251 extra: merge-removal-candidate = yes
240 file: file3 (state "u")
252 file: file3 (state "u")
241 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
253 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
242 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
254 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
243 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
255 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
244 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
256 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
245 *** file1 does not exist
257 *** file1 does not exist
246 --- file2 ---
258 --- file2 ---
247 2
259 2
248 changed
260 changed
249 --- file3 ---
261 --- file3 ---
250 3
262 3
251 <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
263 <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
252 changed2
264 changed2
253 =======
265 =======
254 changed1
266 changed1
255 >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
267 >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
256
268
257
269
258 Interactive merge with not enough input:
270 Interactive merge with not enough input:
259
271
260 $ hg co -C
272 $ hg co -C
261 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
273 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
262 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
274 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
263 1 other heads for branch "default"
275 1 other heads for branch "default"
264
276
265 $ hg merge --config ui.interactive=true <<EOF
277 $ hg merge --config ui.interactive=true <<EOF
266 > d
278 > d
267 > EOF
279 > EOF
268 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
280 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
269 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
281 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
270 What do you want to do? d
282 What do you want to do? d
271 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
283 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
272 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
284 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
273 What do you want to do?
285 What do you want to do?
274 merging file3
286 merging file3
275 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
287 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
276 0 files updated, 0 files merged, 1 files removed, 2 files unresolved
288 0 files updated, 0 files merged, 1 files removed, 2 files unresolved
277 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
289 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
278 [1]
290 [1]
279
291
280 $ status
292 $ status
281 --- status ---
293 --- status ---
282 M file2
294 M file2
283 M file3
295 M file3
284 R file1
296 R file1
285 --- resolve --list ---
297 --- resolve --list ---
286 R file1
298 R file1
287 U file2
299 U file2
288 U file3
300 U file3
289 --- debugmergestate ---
301 --- debugmergestate ---
290 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
302 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
291 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
303 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
292 file: file1 (state "r")
304 file: file1 (state "r")
293 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
305 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
294 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
306 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
295 other path: file1 (node 0000000000000000000000000000000000000000)
307 other path: file1 (node 0000000000000000000000000000000000000000)
296 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
308 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
297 extra: merge-removal-candidate = yes
309 extra: merge-removal-candidate = yes
298 file: file2 (state "u")
310 file: file2 (state "u")
299 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
311 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
300 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
312 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
301 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
313 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
302 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
314 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
303 extra: merge-removal-candidate = yes
315 extra: merge-removal-candidate = yes
304 file: file3 (state "u")
316 file: file3 (state "u")
305 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
317 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
306 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
318 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
307 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
319 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
308 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
320 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
309 *** file1 does not exist
321 *** file1 does not exist
310 --- file2 ---
322 --- file2 ---
311 2
323 2
312 changed
324 changed
313 --- file3 ---
325 --- file3 ---
314 3
326 3
315 <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
327 <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
316 changed2
328 changed2
317 =======
329 =======
318 changed1
330 changed1
319 >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
331 >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
320
332
321 Choose local versions of files
333 Choose local versions of files
322
334
323 $ hg co -C
335 $ hg co -C
324 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
336 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
325 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
337 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
326 1 other heads for branch "default"
338 1 other heads for branch "default"
327
339
328 $ hg merge --tool :local
340 $ hg merge --tool :local
329 0 files updated, 3 files merged, 0 files removed, 0 files unresolved
341 0 files updated, 3 files merged, 0 files removed, 0 files unresolved
330 (branch merge, don't forget to commit)
342 (branch merge, don't forget to commit)
331 $ status 2>&1 | tee $TESTTMP/local.status
343 $ status 2>&1 | tee $TESTTMP/local.status
332 --- status ---
344 --- status ---
333 file2: * (glob)
345 file2: * (glob)
334 M file3
346 M file3
335 C file1
347 C file1
336 --- resolve --list ---
348 --- resolve --list ---
337 R file1
349 R file1
338 R file2
350 R file2
339 R file3
351 R file3
340 --- debugmergestate ---
352 --- debugmergestate ---
341 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
353 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
342 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
354 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
343 file: file1 (state "r")
355 file: file1 (state "r")
344 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
356 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
345 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
357 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
346 other path: file1 (node 0000000000000000000000000000000000000000)
358 other path: file1 (node 0000000000000000000000000000000000000000)
347 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
359 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
348 extra: merge-removal-candidate = yes
360 extra: merge-removal-candidate = yes
349 file: file2 (state "r")
361 file: file2 (state "r")
350 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
362 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
351 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
363 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
352 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
364 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
353 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
365 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
354 extra: merge-removal-candidate = yes
366 extra: merge-removal-candidate = yes
355 file: file3 (state "r")
367 file: file3 (state "r")
356 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
368 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
357 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
369 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
358 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
370 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
359 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
371 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
360 --- file1 ---
372 --- file1 ---
361 1
373 1
362 changed
374 changed
363 *** file2 does not exist
375 *** file2 does not exist
364 --- file3 ---
376 --- file3 ---
365 3
377 3
366 changed2
378 changed2
367
379
368 Choose other versions of files
380 Choose other versions of files
369
381
370 $ hg co -C
382 $ hg co -C
371 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
383 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
372 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
384 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
373 1 other heads for branch "default"
385 1 other heads for branch "default"
374
386
375 $ hg merge --tool :other
387 $ hg merge --tool :other
376 0 files updated, 2 files merged, 1 files removed, 0 files unresolved
388 0 files updated, 2 files merged, 1 files removed, 0 files unresolved
377 (branch merge, don't forget to commit)
389 (branch merge, don't forget to commit)
378 $ status 2>&1 | tee $TESTTMP/other.status
390 $ status 2>&1 | tee $TESTTMP/other.status
379 --- status ---
391 --- status ---
380 M file2
392 M file2
381 M file3
393 M file3
382 R file1
394 R file1
383 --- resolve --list ---
395 --- resolve --list ---
384 R file1
396 R file1
385 R file2
397 R file2
386 R file3
398 R file3
387 --- debugmergestate ---
399 --- debugmergestate ---
388 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
400 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
389 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
401 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
390 file: file1 (state "r")
402 file: file1 (state "r")
391 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
403 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
392 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
404 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
393 other path: file1 (node 0000000000000000000000000000000000000000)
405 other path: file1 (node 0000000000000000000000000000000000000000)
394 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
406 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
395 extra: merge-removal-candidate = yes
407 extra: merge-removal-candidate = yes
396 file: file2 (state "r")
408 file: file2 (state "r")
397 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
409 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
398 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
410 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
399 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
411 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
400 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
412 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
401 extra: merge-removal-candidate = yes
413 extra: merge-removal-candidate = yes
402 file: file3 (state "r")
414 file: file3 (state "r")
403 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
415 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
404 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
416 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
405 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
417 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
406 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
418 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
407 *** file1 does not exist
419 *** file1 does not exist
408 --- file2 ---
420 --- file2 ---
409 2
421 2
410 changed
422 changed
411 --- file3 ---
423 --- file3 ---
412 3
424 3
413 changed1
425 changed1
414
426
415 Fail
427 Fail
416
428
417 $ hg co -C
429 $ hg co -C
418 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
430 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
419 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
431 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
420 1 other heads for branch "default"
432 1 other heads for branch "default"
421
433
422 $ hg merge --tool :fail
434 $ hg merge --tool :fail
423 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
435 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
424 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
436 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
425 [1]
437 [1]
426 $ status 2>&1 | tee $TESTTMP/fail.status
438 $ status 2>&1 | tee $TESTTMP/fail.status
427 --- status ---
439 --- status ---
428 M file2
440 M file2
429 M file3
441 M file3
430 C file1
442 C file1
431 --- resolve --list ---
443 --- resolve --list ---
432 U file1
444 U file1
433 U file2
445 U file2
434 U file3
446 U file3
435 --- debugmergestate ---
447 --- debugmergestate ---
436 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
448 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
437 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
449 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
438 file: file1 (state "u")
450 file: file1 (state "u")
439 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
451 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
440 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
452 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
441 other path: file1 (node 0000000000000000000000000000000000000000)
453 other path: file1 (node 0000000000000000000000000000000000000000)
442 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
454 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
443 extra: merge-removal-candidate = yes
455 extra: merge-removal-candidate = yes
444 file: file2 (state "u")
456 file: file2 (state "u")
445 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
457 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
446 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
458 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
447 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
459 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
448 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
460 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
449 extra: merge-removal-candidate = yes
461 extra: merge-removal-candidate = yes
450 file: file3 (state "u")
462 file: file3 (state "u")
451 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
463 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
452 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
464 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
453 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
465 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
454 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
466 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
455 --- file1 ---
467 --- file1 ---
456 1
468 1
457 changed
469 changed
458 --- file2 ---
470 --- file2 ---
459 2
471 2
460 changed
472 changed
461 --- file3 ---
473 --- file3 ---
462 3
474 3
463 changed2
475 changed2
464
476
465 Force prompts with no input (should be similar to :fail)
477 Force prompts with no input (should be similar to :fail)
466
478
467 $ hg co -C
479 $ hg co -C
468 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
480 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
469 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
481 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
470 1 other heads for branch "default"
482 1 other heads for branch "default"
471
483
472 $ hg merge --config ui.interactive=True --tool :prompt
484 $ hg merge --config ui.interactive=True --tool :prompt
473 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
485 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
474 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
486 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
475 What do you want to do?
487 What do you want to do?
476 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
488 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
477 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
489 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
478 What do you want to do?
490 What do you want to do?
479 file 'file3' needs to be resolved.
491 file 'file3' needs to be resolved.
480 You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
492 You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
481 What do you want to do?
493 What do you want to do?
482 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
494 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
483 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
495 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
484 [1]
496 [1]
485 $ status 2>&1 | tee $TESTTMP/prompt.status
497 $ status 2>&1 | tee $TESTTMP/prompt.status
486 --- status ---
498 --- status ---
487 M file2
499 M file2
488 M file3
500 M file3
489 C file1
501 C file1
490 --- resolve --list ---
502 --- resolve --list ---
491 U file1
503 U file1
492 U file2
504 U file2
493 U file3
505 U file3
494 --- debugmergestate ---
506 --- debugmergestate ---
495 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
507 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
496 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
508 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
497 file: file1 (state "u")
509 file: file1 (state "u")
498 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
510 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
499 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
511 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
500 other path: file1 (node 0000000000000000000000000000000000000000)
512 other path: file1 (node 0000000000000000000000000000000000000000)
501 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
513 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
502 extra: merge-removal-candidate = yes
514 extra: merge-removal-candidate = yes
503 file: file2 (state "u")
515 file: file2 (state "u")
504 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
516 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
505 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
517 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
506 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
518 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
507 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
519 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
508 extra: merge-removal-candidate = yes
520 extra: merge-removal-candidate = yes
509 file: file3 (state "u")
521 file: file3 (state "u")
510 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
522 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
511 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
523 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
512 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
524 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
513 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
525 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
514 --- file1 ---
526 --- file1 ---
515 1
527 1
516 changed
528 changed
517 --- file2 ---
529 --- file2 ---
518 2
530 2
519 changed
531 changed
520 --- file3 ---
532 --- file3 ---
521 3
533 3
522 changed2
534 changed2
523 $ cmp $TESTTMP/fail.status $TESTTMP/prompt.status || diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status
535 $ cmp $TESTTMP/fail.status $TESTTMP/prompt.status || diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status
524
536
525
537
526 Force prompts
538 Force prompts
527
539
528 $ hg co -C
540 $ hg co -C
529 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
541 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
530 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
542 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
531 1 other heads for branch "default"
543 1 other heads for branch "default"
532
544
533 $ hg merge --tool :prompt
545 $ hg merge --tool :prompt
534 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
546 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
535 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
547 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
536 What do you want to do? u
548 What do you want to do? u
537 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
549 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
538 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
550 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
539 What do you want to do? u
551 What do you want to do? u
540 file 'file3' needs to be resolved.
552 file 'file3' needs to be resolved.
541 You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
553 You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
542 What do you want to do? u
554 What do you want to do? u
543 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
555 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
544 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
556 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
545 [1]
557 [1]
546 $ status
558 $ status
547 --- status ---
559 --- status ---
548 M file2
560 M file2
549 M file3
561 M file3
550 C file1
562 C file1
551 --- resolve --list ---
563 --- resolve --list ---
552 U file1
564 U file1
553 U file2
565 U file2
554 U file3
566 U file3
555 --- debugmergestate ---
567 --- debugmergestate ---
556 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
568 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
557 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
569 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
558 file: file1 (state "u")
570 file: file1 (state "u")
559 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
571 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
560 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
572 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
561 other path: file1 (node 0000000000000000000000000000000000000000)
573 other path: file1 (node 0000000000000000000000000000000000000000)
562 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
574 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
563 extra: merge-removal-candidate = yes
575 extra: merge-removal-candidate = yes
564 file: file2 (state "u")
576 file: file2 (state "u")
565 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
577 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
566 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
578 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
567 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
579 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
568 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
580 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
569 extra: merge-removal-candidate = yes
581 extra: merge-removal-candidate = yes
570 file: file3 (state "u")
582 file: file3 (state "u")
571 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
583 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
572 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
584 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
573 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
585 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
574 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
586 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
575 --- file1 ---
587 --- file1 ---
576 1
588 1
577 changed
589 changed
578 --- file2 ---
590 --- file2 ---
579 2
591 2
580 changed
592 changed
581 --- file3 ---
593 --- file3 ---
582 3
594 3
583 changed2
595 changed2
584
596
585 Choose to merge all files
597 Choose to merge all files
586
598
587 $ hg co -C
599 $ hg co -C
588 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
600 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
589 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
601 updated to "13910f48cf7b: changed file1, removed file2, changed file3"
590 1 other heads for branch "default"
602 1 other heads for branch "default"
591
603
592 $ hg merge --tool :merge3
604 $ hg merge --tool :merge3
593 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
605 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
594 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
606 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
595 What do you want to do? u
607 What do you want to do? u
596 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
608 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
597 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
609 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
598 What do you want to do? u
610 What do you want to do? u
599 merging file3
611 merging file3
600 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
612 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
601 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
613 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
602 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
614 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
603 [1]
615 [1]
604 $ status
616 $ status
605 --- status ---
617 --- status ---
606 M file2
618 M file2
607 M file3
619 M file3
608 C file1
620 C file1
609 --- resolve --list ---
621 --- resolve --list ---
610 U file1
622 U file1
611 U file2
623 U file2
612 U file3
624 U file3
613 --- debugmergestate ---
625 --- debugmergestate ---
614 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
626 local (working copy): 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
615 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
627 other (merge rev): 10f9a0a634e82080907e62f075ab119cbc565ea6
616 file: file1 (state "u")
628 file: file1 (state "u")
617 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
629 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
618 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
630 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
619 other path: file1 (node 0000000000000000000000000000000000000000)
631 other path: file1 (node 0000000000000000000000000000000000000000)
620 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
632 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
621 extra: merge-removal-candidate = yes
633 extra: merge-removal-candidate = yes
622 file: file2 (state "u")
634 file: file2 (state "u")
623 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
635 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
624 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
636 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
625 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
637 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
626 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
638 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
627 extra: merge-removal-candidate = yes
639 extra: merge-removal-candidate = yes
628 file: file3 (state "u")
640 file: file3 (state "u")
629 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
641 local path: file3 (hash d5b0a58bc47161b1b8a831084b366f757c4f0b11, flags "")
630 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
642 ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
631 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
643 other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
632 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
644 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
633 --- file1 ---
645 --- file1 ---
634 1
646 1
635 changed
647 changed
636 --- file2 ---
648 --- file2 ---
637 2
649 2
638 changed
650 changed
639 --- file3 ---
651 --- file3 ---
640 3
652 3
641 <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
653 <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
642 changed2
654 changed2
643 ||||||| base
655 ||||||| base
644 =======
656 =======
645 changed1
657 changed1
646 >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
658 >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
647
659
648 Exercise transitions between local, other, fail and prompt, and make sure the
660 Exercise transitions between local, other, fail and prompt, and make sure the
649 dirstate stays consistent. (Compare with each other and to the above
661 dirstate stays consistent. (Compare with each other and to the above
650 invocations.)
662 invocations.)
651
663
652 $ testtransitions() {
664 $ testtransitions() {
653 > # this traversal order covers every transition
665 > # this traversal order covers every transition
654 > tools="local other prompt local fail other local prompt other fail prompt fail local"
666 > tools="local other prompt local fail other local prompt other fail prompt fail local"
655 > lasttool="merge3"
667 > lasttool="merge3"
656 > for tool in $tools; do
668 > for tool in $tools; do
657 > echo "=== :$lasttool -> :$tool ==="
669 > echo "=== :$lasttool -> :$tool ==="
658 > ref="$TESTTMP/$tool.status"
670 > ref="$TESTTMP/$tool.status"
659 > hg resolve --unmark --all
671 > hg resolve --unmark --all
660 > hg resolve --tool ":$tool" --all --config ui.interactive=True
672 > hg resolve --tool ":$tool" --all --config ui.interactive=True
661 > status > "$TESTTMP/compare.status" 2>&1
673 > status > "$TESTTMP/compare.status" 2>&1
662 > echo '--- diff of status ---'
674 > echo '--- diff of status ---'
663 > if cmp "$TESTTMP/$tool.status" "$TESTTMP/compare.status" || diff -U8 "$TESTTMP/$tool.status" "$TESTTMP/compare.status"; then
675 > if cmp "$TESTTMP/$tool.status" "$TESTTMP/compare.status" || diff -U8 "$TESTTMP/$tool.status" "$TESTTMP/compare.status"; then
664 > echo '(status identical)'
676 > echo '(status identical)'
665 > fi
677 > fi
666 > lasttool="$tool"
678 > lasttool="$tool"
667 > echo
679 > echo
668 > done
680 > done
669 > }
681 > }
670
682
671 $ testtransitions
683 $ testtransitions
672 === :merge3 -> :local ===
684 === :merge3 -> :local ===
673 (no more unresolved files)
685 (no more unresolved files)
674 --- diff of status ---
686 --- diff of status ---
675 (status identical)
687 (status identical)
676
688
677 === :local -> :other ===
689 === :local -> :other ===
678 (no more unresolved files)
690 (no more unresolved files)
679 --- diff of status ---
691 --- diff of status ---
680 (status identical)
692 (status identical)
681
693
682 === :other -> :prompt ===
694 === :other -> :prompt ===
683 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
695 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
684 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
696 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
685 What do you want to do?
697 What do you want to do?
686 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
698 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
687 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
699 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
688 What do you want to do?
700 What do you want to do?
689 file 'file3' needs to be resolved.
701 file 'file3' needs to be resolved.
690 You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
702 You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
691 What do you want to do?
703 What do you want to do?
692 --- diff of status ---
704 --- diff of status ---
693 (status identical)
705 (status identical)
694
706
695 === :prompt -> :local ===
707 === :prompt -> :local ===
696 (no more unresolved files)
708 (no more unresolved files)
697 --- diff of status ---
709 --- diff of status ---
698 (status identical)
710 (status identical)
699
711
700 === :local -> :fail ===
712 === :local -> :fail ===
701 --- diff of status ---
713 --- diff of status ---
702 (status identical)
714 (status identical)
703
715
704 === :fail -> :other ===
716 === :fail -> :other ===
705 (no more unresolved files)
717 (no more unresolved files)
706 --- diff of status ---
718 --- diff of status ---
707 (status identical)
719 (status identical)
708
720
709 === :other -> :local ===
721 === :other -> :local ===
710 (no more unresolved files)
722 (no more unresolved files)
711 --- diff of status ---
723 --- diff of status ---
712 (status identical)
724 (status identical)
713
725
714 === :local -> :prompt ===
726 === :local -> :prompt ===
715 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
727 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
716 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
728 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
717 What do you want to do?
729 What do you want to do?
718 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
730 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
719 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
731 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
720 What do you want to do?
732 What do you want to do?
721 file 'file3' needs to be resolved.
733 file 'file3' needs to be resolved.
722 You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
734 You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
723 What do you want to do?
735 What do you want to do?
724 --- diff of status ---
736 --- diff of status ---
725 (status identical)
737 (status identical)
726
738
727 === :prompt -> :other ===
739 === :prompt -> :other ===
728 (no more unresolved files)
740 (no more unresolved files)
729 --- diff of status ---
741 --- diff of status ---
730 (status identical)
742 (status identical)
731
743
732 === :other -> :fail ===
744 === :other -> :fail ===
733 --- diff of status ---
745 --- diff of status ---
734 (status identical)
746 (status identical)
735
747
736 === :fail -> :prompt ===
748 === :fail -> :prompt ===
737 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
749 file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
738 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
750 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
739 What do you want to do?
751 What do you want to do?
740 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
752 file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
741 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
753 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
742 What do you want to do?
754 What do you want to do?
743 file 'file3' needs to be resolved.
755 file 'file3' needs to be resolved.
744 You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
756 You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
745 What do you want to do?
757 What do you want to do?
746 --- diff of status ---
758 --- diff of status ---
747 (status identical)
759 (status identical)
748
760
749 === :prompt -> :fail ===
761 === :prompt -> :fail ===
750 --- diff of status ---
762 --- diff of status ---
751 (status identical)
763 (status identical)
752
764
753 === :fail -> :local ===
765 === :fail -> :local ===
754 (no more unresolved files)
766 (no more unresolved files)
755 --- diff of status ---
767 --- diff of status ---
756 (status identical)
768 (status identical)
757
769
758
770
759
771
760 Non-interactive linear update
772 Non-interactive linear update
761
773
762 $ hg co -C 0
774 $ hg co -C 0
763 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
775 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
764 $ echo changed >> file1
776 $ echo changed >> file1
765 $ hg rm file2
777 $ hg rm file2
766 $ hg update 1 -y
778 $ hg update 1 -y
767 file 'file1' was deleted in other [destination] but was modified in local [working copy].
779 file 'file1' was deleted in other [destination] but was modified in local [working copy].
768 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
780 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
769 What do you want to do? u
781 What do you want to do? u
770 file 'file2' was deleted in local [working copy] but was modified in other [destination].
782 file 'file2' was deleted in local [working copy] but was modified in other [destination].
771 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
783 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
772 What do you want to do? u
784 What do you want to do? u
773 1 files updated, 0 files merged, 0 files removed, 2 files unresolved
785 1 files updated, 0 files merged, 0 files removed, 2 files unresolved
774 use 'hg resolve' to retry unresolved file merges
786 use 'hg resolve' to retry unresolved file merges
775 [1]
787 [1]
776 $ status
788 $ status
777 --- status ---
789 --- status ---
778 A file1
790 A file1
779 C file2
791 C file2
780 C file3
792 C file3
781 --- resolve --list ---
793 --- resolve --list ---
782 U file1
794 U file1
783 U file2
795 U file2
784 --- debugmergestate ---
796 --- debugmergestate ---
785 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
797 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
786 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
798 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
787 file: file1 (state "u")
799 file: file1 (state "u")
788 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
800 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
789 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
801 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
790 other path: file1 (node 0000000000000000000000000000000000000000)
802 other path: file1 (node 0000000000000000000000000000000000000000)
791 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
803 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
792 file: file2 (state "u")
804 file: file2 (state "u")
793 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
805 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
794 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
806 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
795 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
807 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
796 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
808 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
797 --- file1 ---
809 --- file1 ---
798 1
810 1
799 changed
811 changed
800 --- file2 ---
812 --- file2 ---
801 2
813 2
802 changed
814 changed
803 --- file3 ---
815 --- file3 ---
804 3
816 3
805 changed1
817 changed1
806
818
807 Choose local versions of files
819 Choose local versions of files
808
820
809 $ hg co -C 0
821 $ hg co -C 0
810 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
822 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
811 $ echo changed >> file1
823 $ echo changed >> file1
812 $ hg rm file2
824 $ hg rm file2
813 $ hg update 1 --tool :local
825 $ hg update 1 --tool :local
814 1 files updated, 2 files merged, 0 files removed, 0 files unresolved
826 1 files updated, 2 files merged, 0 files removed, 0 files unresolved
815 $ status 2>&1 | tee $TESTTMP/local.status
827 $ status 2>&1 | tee $TESTTMP/local.status
816 --- status ---
828 --- status ---
817 file2: * (glob)
829 file2: * (glob)
818 A file1
830 A file1
819 C file3
831 C file3
820 --- resolve --list ---
832 --- resolve --list ---
821 R file1
833 R file1
822 R file2
834 R file2
823 --- debugmergestate ---
835 --- debugmergestate ---
824 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
836 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
825 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
837 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
826 file: file1 (state "r")
838 file: file1 (state "r")
827 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
839 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
828 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
840 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
829 other path: file1 (node 0000000000000000000000000000000000000000)
841 other path: file1 (node 0000000000000000000000000000000000000000)
830 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
842 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
831 file: file2 (state "r")
843 file: file2 (state "r")
832 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
844 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
833 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
845 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
834 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
846 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
835 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
847 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
836 --- file1 ---
848 --- file1 ---
837 1
849 1
838 changed
850 changed
839 *** file2 does not exist
851 *** file2 does not exist
840 --- file3 ---
852 --- file3 ---
841 3
853 3
842 changed1
854 changed1
843
855
844 Choose other versions of files
856 Choose other versions of files
845
857
846 $ hg co -C 0
858 $ hg co -C 0
847 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
859 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
848 $ echo changed >> file1
860 $ echo changed >> file1
849 $ hg rm file2
861 $ hg rm file2
850 $ hg update 1 --tool :other
862 $ hg update 1 --tool :other
851 1 files updated, 1 files merged, 1 files removed, 0 files unresolved
863 1 files updated, 1 files merged, 1 files removed, 0 files unresolved
852 $ status 2>&1 | tee $TESTTMP/other.status
864 $ status 2>&1 | tee $TESTTMP/other.status
853 --- status ---
865 --- status ---
854 file1: * (glob)
866 file1: * (glob)
855 C file2
867 C file2
856 C file3
868 C file3
857 --- resolve --list ---
869 --- resolve --list ---
858 R file1
870 R file1
859 R file2
871 R file2
860 --- debugmergestate ---
872 --- debugmergestate ---
861 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
873 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
862 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
874 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
863 file: file1 (state "r")
875 file: file1 (state "r")
864 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
876 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
865 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
877 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
866 other path: file1 (node 0000000000000000000000000000000000000000)
878 other path: file1 (node 0000000000000000000000000000000000000000)
867 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
879 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
868 file: file2 (state "r")
880 file: file2 (state "r")
869 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
881 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
870 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
882 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
871 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
883 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
872 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
884 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
873 *** file1 does not exist
885 *** file1 does not exist
874 --- file2 ---
886 --- file2 ---
875 2
887 2
876 changed
888 changed
877 --- file3 ---
889 --- file3 ---
878 3
890 3
879 changed1
891 changed1
880
892
881 Fail
893 Fail
882
894
883 $ hg co -C 0
895 $ hg co -C 0
884 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
896 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
885 $ echo changed >> file1
897 $ echo changed >> file1
886 $ hg rm file2
898 $ hg rm file2
887 $ hg update 1 --tool :fail
899 $ hg update 1 --tool :fail
888 1 files updated, 0 files merged, 0 files removed, 2 files unresolved
900 1 files updated, 0 files merged, 0 files removed, 2 files unresolved
889 use 'hg resolve' to retry unresolved file merges
901 use 'hg resolve' to retry unresolved file merges
890 [1]
902 [1]
891 $ status 2>&1 | tee $TESTTMP/fail.status
903 $ status 2>&1 | tee $TESTTMP/fail.status
892 --- status ---
904 --- status ---
893 A file1
905 A file1
894 C file2
906 C file2
895 C file3
907 C file3
896 --- resolve --list ---
908 --- resolve --list ---
897 U file1
909 U file1
898 U file2
910 U file2
899 --- debugmergestate ---
911 --- debugmergestate ---
900 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
912 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
901 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
913 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
902 file: file1 (state "u")
914 file: file1 (state "u")
903 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
915 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
904 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
916 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
905 other path: file1 (node 0000000000000000000000000000000000000000)
917 other path: file1 (node 0000000000000000000000000000000000000000)
906 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
918 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
907 file: file2 (state "u")
919 file: file2 (state "u")
908 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
920 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
909 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
921 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
910 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
922 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
911 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
923 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
912 --- file1 ---
924 --- file1 ---
913 1
925 1
914 changed
926 changed
915 --- file2 ---
927 --- file2 ---
916 2
928 2
917 changed
929 changed
918 --- file3 ---
930 --- file3 ---
919 3
931 3
920 changed1
932 changed1
921
933
922 Force prompts with no input
934 Force prompts with no input
923
935
924 $ hg co -C 0
936 $ hg co -C 0
925 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
937 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
926 $ echo changed >> file1
938 $ echo changed >> file1
927 $ hg rm file2
939 $ hg rm file2
928 $ hg update 1 --config ui.interactive=True --tool :prompt
940 $ hg update 1 --config ui.interactive=True --tool :prompt
929 file 'file1' was deleted in other [destination] but was modified in local [working copy].
941 file 'file1' was deleted in other [destination] but was modified in local [working copy].
930 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
942 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
931 What do you want to do?
943 What do you want to do?
932 file 'file2' was deleted in local [working copy] but was modified in other [destination].
944 file 'file2' was deleted in local [working copy] but was modified in other [destination].
933 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
945 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
934 What do you want to do?
946 What do you want to do?
935 1 files updated, 0 files merged, 0 files removed, 2 files unresolved
947 1 files updated, 0 files merged, 0 files removed, 2 files unresolved
936 use 'hg resolve' to retry unresolved file merges
948 use 'hg resolve' to retry unresolved file merges
937 [1]
949 [1]
938 $ status 2>&1 | tee $TESTTMP/prompt.status
950 $ status 2>&1 | tee $TESTTMP/prompt.status
939 --- status ---
951 --- status ---
940 A file1
952 A file1
941 C file2
953 C file2
942 C file3
954 C file3
943 --- resolve --list ---
955 --- resolve --list ---
944 U file1
956 U file1
945 U file2
957 U file2
946 --- debugmergestate ---
958 --- debugmergestate ---
947 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
959 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
948 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
960 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
949 file: file1 (state "u")
961 file: file1 (state "u")
950 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
962 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
951 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
963 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
952 other path: file1 (node 0000000000000000000000000000000000000000)
964 other path: file1 (node 0000000000000000000000000000000000000000)
953 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
965 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
954 file: file2 (state "u")
966 file: file2 (state "u")
955 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
967 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
956 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
968 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
957 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
969 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
958 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
970 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
959 --- file1 ---
971 --- file1 ---
960 1
972 1
961 changed
973 changed
962 --- file2 ---
974 --- file2 ---
963 2
975 2
964 changed
976 changed
965 --- file3 ---
977 --- file3 ---
966 3
978 3
967 changed1
979 changed1
968 $ cmp $TESTTMP/fail.status $TESTTMP/prompt.status || diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status
980 $ cmp $TESTTMP/fail.status $TESTTMP/prompt.status || diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status
969
981
970 Choose to merge all files
982 Choose to merge all files
971
983
972 $ hg co -C 0
984 $ hg co -C 0
973 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
985 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
974 $ echo changed >> file1
986 $ echo changed >> file1
975 $ hg rm file2
987 $ hg rm file2
976 $ hg update 1 --tool :merge3
988 $ hg update 1 --tool :merge3
977 file 'file1' was deleted in other [destination] but was modified in local [working copy].
989 file 'file1' was deleted in other [destination] but was modified in local [working copy].
978 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
990 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
979 What do you want to do? u
991 What do you want to do? u
980 file 'file2' was deleted in local [working copy] but was modified in other [destination].
992 file 'file2' was deleted in local [working copy] but was modified in other [destination].
981 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
993 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
982 What do you want to do? u
994 What do you want to do? u
983 1 files updated, 0 files merged, 0 files removed, 2 files unresolved
995 1 files updated, 0 files merged, 0 files removed, 2 files unresolved
984 use 'hg resolve' to retry unresolved file merges
996 use 'hg resolve' to retry unresolved file merges
985 [1]
997 [1]
986 $ status
998 $ status
987 --- status ---
999 --- status ---
988 A file1
1000 A file1
989 C file2
1001 C file2
990 C file3
1002 C file3
991 --- resolve --list ---
1003 --- resolve --list ---
992 U file1
1004 U file1
993 U file2
1005 U file2
994 --- debugmergestate ---
1006 --- debugmergestate ---
995 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
1007 local (working copy): ab57bf49aa276a22d35a473592d4c34b5abc3eff
996 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
1008 other (destination): 10f9a0a634e82080907e62f075ab119cbc565ea6
997 file: file1 (state "u")
1009 file: file1 (state "u")
998 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
1010 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "")
999 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
1011 ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
1000 other path: file1 (node 0000000000000000000000000000000000000000)
1012 other path: file1 (node 0000000000000000000000000000000000000000)
1001 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
1013 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
1002 file: file2 (state "u")
1014 file: file2 (state "u")
1003 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
1015 local path: file2 (hash 0000000000000000000000000000000000000000, flags "")
1004 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
1016 ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
1005 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
1017 other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
1006 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
1018 extra: ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff
1007 --- file1 ---
1019 --- file1 ---
1008 1
1020 1
1009 changed
1021 changed
1010 --- file2 ---
1022 --- file2 ---
1011 2
1023 2
1012 changed
1024 changed
1013 --- file3 ---
1025 --- file3 ---
1014 3
1026 3
1015 changed1
1027 changed1
1016
1028
1017 Test transitions between different merge tools
1029 Test transitions between different merge tools
1018
1030
1019 $ testtransitions
1031 $ testtransitions
1020 === :merge3 -> :local ===
1032 === :merge3 -> :local ===
1021 (no more unresolved files)
1033 (no more unresolved files)
1022 --- diff of status ---
1034 --- diff of status ---
1023 (status identical)
1035 (status identical)
1024
1036
1025 === :local -> :other ===
1037 === :local -> :other ===
1026 (no more unresolved files)
1038 (no more unresolved files)
1027 --- diff of status ---
1039 --- diff of status ---
1028 (status identical)
1040 (status identical)
1029
1041
1030 === :other -> :prompt ===
1042 === :other -> :prompt ===
1031 file 'file1' was deleted in other [destination] but was modified in local [working copy].
1043 file 'file1' was deleted in other [destination] but was modified in local [working copy].
1032 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
1044 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
1033 What do you want to do?
1045 What do you want to do?
1034 file 'file2' was deleted in local [working copy] but was modified in other [destination].
1046 file 'file2' was deleted in local [working copy] but was modified in other [destination].
1035 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
1047 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
1036 What do you want to do?
1048 What do you want to do?
1037 --- diff of status ---
1049 --- diff of status ---
1038 (status identical)
1050 (status identical)
1039
1051
1040 === :prompt -> :local ===
1052 === :prompt -> :local ===
1041 (no more unresolved files)
1053 (no more unresolved files)
1042 --- diff of status ---
1054 --- diff of status ---
1043 (status identical)
1055 (status identical)
1044
1056
1045 === :local -> :fail ===
1057 === :local -> :fail ===
1046 --- diff of status ---
1058 --- diff of status ---
1047 (status identical)
1059 (status identical)
1048
1060
1049 === :fail -> :other ===
1061 === :fail -> :other ===
1050 (no more unresolved files)
1062 (no more unresolved files)
1051 --- diff of status ---
1063 --- diff of status ---
1052 (status identical)
1064 (status identical)
1053
1065
1054 === :other -> :local ===
1066 === :other -> :local ===
1055 (no more unresolved files)
1067 (no more unresolved files)
1056 --- diff of status ---
1068 --- diff of status ---
1057 (status identical)
1069 (status identical)
1058
1070
1059 === :local -> :prompt ===
1071 === :local -> :prompt ===
1060 file 'file1' was deleted in other [destination] but was modified in local [working copy].
1072 file 'file1' was deleted in other [destination] but was modified in local [working copy].
1061 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
1073 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
1062 What do you want to do?
1074 What do you want to do?
1063 file 'file2' was deleted in local [working copy] but was modified in other [destination].
1075 file 'file2' was deleted in local [working copy] but was modified in other [destination].
1064 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
1076 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
1065 What do you want to do?
1077 What do you want to do?
1066 --- diff of status ---
1078 --- diff of status ---
1067 (status identical)
1079 (status identical)
1068
1080
1069 === :prompt -> :other ===
1081 === :prompt -> :other ===
1070 (no more unresolved files)
1082 (no more unresolved files)
1071 --- diff of status ---
1083 --- diff of status ---
1072 (status identical)
1084 (status identical)
1073
1085
1074 === :other -> :fail ===
1086 === :other -> :fail ===
1075 --- diff of status ---
1087 --- diff of status ---
1076 (status identical)
1088 (status identical)
1077
1089
1078 === :fail -> :prompt ===
1090 === :fail -> :prompt ===
1079 file 'file1' was deleted in other [destination] but was modified in local [working copy].
1091 file 'file1' was deleted in other [destination] but was modified in local [working copy].
1080 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
1092 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
1081 What do you want to do?
1093 What do you want to do?
1082 file 'file2' was deleted in local [working copy] but was modified in other [destination].
1094 file 'file2' was deleted in local [working copy] but was modified in other [destination].
1083 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
1095 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
1084 What do you want to do?
1096 What do you want to do?
1085 --- diff of status ---
1097 --- diff of status ---
1086 (status identical)
1098 (status identical)
1087
1099
1088 === :prompt -> :fail ===
1100 === :prompt -> :fail ===
1089 --- diff of status ---
1101 --- diff of status ---
1090 (status identical)
1102 (status identical)
1091
1103
1092 === :fail -> :local ===
1104 === :fail -> :local ===
1093 (no more unresolved files)
1105 (no more unresolved files)
1094 --- diff of status ---
1106 --- diff of status ---
1095 (status identical)
1107 (status identical)
1096
1108
General Comments 0
You need to be logged in to leave comments. Login now