Show More
@@ -1,366 +1,367 b'' | |||||
1 | test that a commit clears the merge state. |
|
1 | test that a commit clears the merge state. | |
2 |
|
2 | |||
3 | $ hg init repo |
|
3 | $ hg init repo | |
4 | $ cd repo |
|
4 | $ cd repo | |
5 |
|
5 | |||
6 | $ echo foo > file1 |
|
6 | $ echo foo > file1 | |
7 | $ echo foo > file2 |
|
7 | $ echo foo > file2 | |
8 | $ hg commit -Am 'add files' |
|
8 | $ hg commit -Am 'add files' | |
9 | adding file1 |
|
9 | adding file1 | |
10 | adding file2 |
|
10 | adding file2 | |
11 |
|
11 | |||
12 | $ echo bar >> file1 |
|
12 | $ echo bar >> file1 | |
13 | $ echo bar >> file2 |
|
13 | $ echo bar >> file2 | |
14 | $ hg commit -Am 'append bar to files' |
|
14 | $ hg commit -Am 'append bar to files' | |
15 |
|
15 | |||
16 | create a second head with conflicting edits |
|
16 | create a second head with conflicting edits | |
17 |
|
17 | |||
18 | $ hg up -C 0 |
|
18 | $ hg up -C 0 | |
19 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
19 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
20 | $ echo baz >> file1 |
|
20 | $ echo baz >> file1 | |
21 | $ echo baz >> file2 |
|
21 | $ echo baz >> file2 | |
22 | $ hg commit -Am 'append baz to files' |
|
22 | $ hg commit -Am 'append baz to files' | |
23 | created new head |
|
23 | created new head | |
24 |
|
24 | |||
25 | create a third head with no conflicting edits |
|
25 | create a third head with no conflicting edits | |
26 | $ hg up -qC 0 |
|
26 | $ hg up -qC 0 | |
27 | $ echo foo > file3 |
|
27 | $ echo foo > file3 | |
28 | $ hg commit -Am 'add non-conflicting file' |
|
28 | $ hg commit -Am 'add non-conflicting file' | |
29 | adding file3 |
|
29 | adding file3 | |
30 | created new head |
|
30 | created new head | |
31 |
|
31 | |||
32 | failing merge |
|
32 | failing merge | |
33 |
|
33 | |||
34 | $ hg up -qC 2 |
|
34 | $ hg up -qC 2 | |
35 | $ hg merge --tool=internal:fail 1 |
|
35 | $ hg merge --tool=internal:fail 1 | |
36 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
36 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
37 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
37 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
38 | [1] |
|
38 | [1] | |
39 |
|
39 | |||
40 | resolve -l should contain unresolved entries |
|
40 | resolve -l should contain unresolved entries | |
41 |
|
41 | |||
42 | $ hg resolve -l |
|
42 | $ hg resolve -l | |
43 | U file1 |
|
43 | U file1 | |
44 | U file2 |
|
44 | U file2 | |
45 |
|
45 | |||
46 | $ hg resolve -l --no-status |
|
46 | $ hg resolve -l --no-status | |
47 | file1 |
|
47 | file1 | |
48 | file2 |
|
48 | file2 | |
49 |
|
49 | |||
50 | resolving an unknown path should emit a warning, but not for -l |
|
50 | resolving an unknown path should emit a warning, but not for -l | |
51 |
|
51 | |||
52 | $ hg resolve -m does-not-exist |
|
52 | $ hg resolve -m does-not-exist | |
53 | arguments do not match paths that need resolving |
|
53 | arguments do not match paths that need resolving | |
54 | $ hg resolve -l does-not-exist |
|
54 | $ hg resolve -l does-not-exist | |
55 |
|
55 | |||
56 | tell users how they could have used resolve |
|
56 | tell users how they could have used resolve | |
57 |
|
57 | |||
58 | $ mkdir nested |
|
58 | $ mkdir nested | |
59 | $ cd nested |
|
59 | $ cd nested | |
60 | $ hg resolve -m file1 |
|
60 | $ hg resolve -m file1 | |
61 | arguments do not match paths that need resolving |
|
61 | arguments do not match paths that need resolving | |
62 | (try: hg resolve -m path:file1) |
|
62 | (try: hg resolve -m path:file1) | |
63 | $ hg resolve -m file1 filez |
|
63 | $ hg resolve -m file1 filez | |
64 | arguments do not match paths that need resolving |
|
64 | arguments do not match paths that need resolving | |
65 | (try: hg resolve -m path:file1 path:filez) |
|
65 | (try: hg resolve -m path:file1 path:filez) | |
66 | $ hg resolve -m path:file1 path:filez |
|
66 | $ hg resolve -m path:file1 path:filez | |
67 | $ hg resolve -l |
|
67 | $ hg resolve -l | |
68 | R file1 |
|
68 | R file1 | |
69 | U file2 |
|
69 | U file2 | |
70 | $ hg resolve -m filez file2 |
|
70 | $ hg resolve -m filez file2 | |
71 | arguments do not match paths that need resolving |
|
71 | arguments do not match paths that need resolving | |
72 | (try: hg resolve -m path:filez path:file2) |
|
72 | (try: hg resolve -m path:filez path:file2) | |
73 | $ hg resolve -m path:filez path:file2 |
|
73 | $ hg resolve -m path:filez path:file2 | |
74 | (no more unresolved files) |
|
74 | (no more unresolved files) | |
75 | $ hg resolve -l |
|
75 | $ hg resolve -l | |
76 | R file1 |
|
76 | R file1 | |
77 | R file2 |
|
77 | R file2 | |
78 |
|
78 | |||
79 | cleanup |
|
79 | cleanup | |
80 | $ hg resolve -u |
|
80 | $ hg resolve -u | |
81 | $ cd .. |
|
81 | $ cd .. | |
82 | $ rmdir nested |
|
82 | $ rmdir nested | |
83 |
|
83 | |||
84 | don't allow marking or unmarking driver-resolved files |
|
84 | don't allow marking or unmarking driver-resolved files | |
85 |
|
85 | |||
86 | $ cat > $TESTTMP/markdriver.py << EOF |
|
86 | $ cat > $TESTTMP/markdriver.py << EOF | |
87 | > '''mark and unmark files as driver-resolved''' |
|
87 | > '''mark and unmark files as driver-resolved''' | |
88 | > from mercurial import merge, registrar, scmutil |
|
88 | > from mercurial import merge, registrar, scmutil, pycompat | |
89 | > cmdtable = {} |
|
89 | > cmdtable = {} | |
90 | > command = registrar.command(cmdtable) |
|
90 | > command = registrar.command(cmdtable) | |
91 | > @command(b'markdriver', |
|
91 | > @command(b'markdriver', | |
92 | > [('u', 'unmark', None, '')], |
|
92 | > [(b'u', b'unmark', None, b'')], | |
93 | > 'FILE...') |
|
93 | > b'FILE...') | |
94 | > def markdriver(ui, repo, *pats, **opts): |
|
94 | > def markdriver(ui, repo, *pats, **opts): | |
95 | > wlock = repo.wlock() |
|
95 | > wlock = repo.wlock() | |
|
96 | > opts = pycompat.byteskwargs(opts) | |||
96 | > try: |
|
97 | > try: | |
97 | > ms = merge.mergestate.read(repo) |
|
98 | > ms = merge.mergestate.read(repo) | |
98 | > m = scmutil.match(repo[None], pats, opts) |
|
99 | > m = scmutil.match(repo[None], pats, opts) | |
99 | > for f in ms: |
|
100 | > for f in ms: | |
100 | > if not m(f): |
|
101 | > if not m(f): | |
101 | > continue |
|
102 | > continue | |
102 | > if not opts['unmark']: |
|
103 | > if not opts[b'unmark']: | |
103 | > ms.mark(f, 'd') |
|
104 | > ms.mark(f, b'd') | |
104 | > else: |
|
105 | > else: | |
105 | > ms.mark(f, 'u') |
|
106 | > ms.mark(f, b'u') | |
106 | > ms.commit() |
|
107 | > ms.commit() | |
107 | > finally: |
|
108 | > finally: | |
108 | > wlock.release() |
|
109 | > wlock.release() | |
109 | > EOF |
|
110 | > EOF | |
110 | $ hg --config extensions.markdriver=$TESTTMP/markdriver.py markdriver file1 |
|
111 | $ hg --config extensions.markdriver=$TESTTMP/markdriver.py markdriver file1 | |
111 | $ hg resolve --list |
|
112 | $ hg resolve --list | |
112 | D file1 |
|
113 | D file1 | |
113 | U file2 |
|
114 | U file2 | |
114 | $ hg resolve --mark file1 |
|
115 | $ hg resolve --mark file1 | |
115 | not marking file1 as it is driver-resolved |
|
116 | not marking file1 as it is driver-resolved | |
116 | this should not print out file1 |
|
117 | this should not print out file1 | |
117 | $ hg resolve --mark --all |
|
118 | $ hg resolve --mark --all | |
118 | (no more unresolved files -- run "hg resolve --all" to conclude) |
|
119 | (no more unresolved files -- run "hg resolve --all" to conclude) | |
119 | $ hg resolve --mark 'glob:file*' |
|
120 | $ hg resolve --mark 'glob:file*' | |
120 | (no more unresolved files -- run "hg resolve --all" to conclude) |
|
121 | (no more unresolved files -- run "hg resolve --all" to conclude) | |
121 | $ hg resolve --list |
|
122 | $ hg resolve --list | |
122 | D file1 |
|
123 | D file1 | |
123 | R file2 |
|
124 | R file2 | |
124 | $ hg resolve --unmark file1 |
|
125 | $ hg resolve --unmark file1 | |
125 | not unmarking file1 as it is driver-resolved |
|
126 | not unmarking file1 as it is driver-resolved | |
126 | (no more unresolved files -- run "hg resolve --all" to conclude) |
|
127 | (no more unresolved files -- run "hg resolve --all" to conclude) | |
127 | $ hg resolve --unmark --all |
|
128 | $ hg resolve --unmark --all | |
128 | $ hg resolve --list |
|
129 | $ hg resolve --list | |
129 | D file1 |
|
130 | D file1 | |
130 | U file2 |
|
131 | U file2 | |
131 | $ hg --config extensions.markdriver=$TESTTMP/markdriver.py markdriver --unmark file1 |
|
132 | $ hg --config extensions.markdriver=$TESTTMP/markdriver.py markdriver --unmark file1 | |
132 | $ hg resolve --list |
|
133 | $ hg resolve --list | |
133 | U file1 |
|
134 | U file1 | |
134 | U file2 |
|
135 | U file2 | |
135 |
|
136 | |||
136 | resolve the failure |
|
137 | resolve the failure | |
137 |
|
138 | |||
138 | $ echo resolved > file1 |
|
139 | $ echo resolved > file1 | |
139 | $ hg resolve -m file1 |
|
140 | $ hg resolve -m file1 | |
140 |
|
141 | |||
141 | resolve -l should show resolved file as resolved |
|
142 | resolve -l should show resolved file as resolved | |
142 |
|
143 | |||
143 | $ hg resolve -l |
|
144 | $ hg resolve -l | |
144 | R file1 |
|
145 | R file1 | |
145 | U file2 |
|
146 | U file2 | |
146 |
|
147 | |||
147 | $ hg resolve -l -Tjson |
|
148 | $ hg resolve -l -Tjson | |
148 | [ |
|
149 | [ | |
149 | { |
|
150 | { | |
150 | "path": "file1", |
|
151 | "path": "file1", | |
151 | "status": "R" |
|
152 | "status": "R" | |
152 | }, |
|
153 | }, | |
153 | { |
|
154 | { | |
154 | "path": "file2", |
|
155 | "path": "file2", | |
155 | "status": "U" |
|
156 | "status": "U" | |
156 | } |
|
157 | } | |
157 | ] |
|
158 | ] | |
158 |
|
159 | |||
159 | resolve -m without paths should mark all resolved |
|
160 | resolve -m without paths should mark all resolved | |
160 |
|
161 | |||
161 | $ hg resolve -m |
|
162 | $ hg resolve -m | |
162 | (no more unresolved files) |
|
163 | (no more unresolved files) | |
163 | $ hg commit -m 'resolved' |
|
164 | $ hg commit -m 'resolved' | |
164 |
|
165 | |||
165 | resolve -l should be empty after commit |
|
166 | resolve -l should be empty after commit | |
166 |
|
167 | |||
167 | $ hg resolve -l |
|
168 | $ hg resolve -l | |
168 |
|
169 | |||
169 | $ hg resolve -l -Tjson |
|
170 | $ hg resolve -l -Tjson | |
170 | [ |
|
171 | [ | |
171 | ] |
|
172 | ] | |
172 |
|
173 | |||
173 | resolve --all should abort when no merge in progress |
|
174 | resolve --all should abort when no merge in progress | |
174 |
|
175 | |||
175 | $ hg resolve --all |
|
176 | $ hg resolve --all | |
176 | abort: resolve command not applicable when not merging |
|
177 | abort: resolve command not applicable when not merging | |
177 | [255] |
|
178 | [255] | |
178 |
|
179 | |||
179 | resolve -m should abort when no merge in progress |
|
180 | resolve -m should abort when no merge in progress | |
180 |
|
181 | |||
181 | $ hg resolve -m |
|
182 | $ hg resolve -m | |
182 | abort: resolve command not applicable when not merging |
|
183 | abort: resolve command not applicable when not merging | |
183 | [255] |
|
184 | [255] | |
184 |
|
185 | |||
185 | can not update or merge when there are unresolved conflicts |
|
186 | can not update or merge when there are unresolved conflicts | |
186 |
|
187 | |||
187 | $ hg up -qC 0 |
|
188 | $ hg up -qC 0 | |
188 | $ echo quux >> file1 |
|
189 | $ echo quux >> file1 | |
189 | $ hg up 1 |
|
190 | $ hg up 1 | |
190 | merging file1 |
|
191 | merging file1 | |
191 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
|
192 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') | |
192 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
193 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
193 | use 'hg resolve' to retry unresolved file merges |
|
194 | use 'hg resolve' to retry unresolved file merges | |
194 | [1] |
|
195 | [1] | |
195 | $ hg up 0 |
|
196 | $ hg up 0 | |
196 | abort: outstanding merge conflicts |
|
197 | abort: outstanding merge conflicts | |
197 | [255] |
|
198 | [255] | |
198 | $ hg merge 2 |
|
199 | $ hg merge 2 | |
199 | abort: outstanding merge conflicts |
|
200 | abort: outstanding merge conflicts | |
200 | [255] |
|
201 | [255] | |
201 | $ hg merge --force 2 |
|
202 | $ hg merge --force 2 | |
202 | abort: outstanding merge conflicts |
|
203 | abort: outstanding merge conflicts | |
203 | [255] |
|
204 | [255] | |
204 |
|
205 | |||
205 | set up conflict-free merge |
|
206 | set up conflict-free merge | |
206 |
|
207 | |||
207 | $ hg up -qC 3 |
|
208 | $ hg up -qC 3 | |
208 | $ hg merge 1 |
|
209 | $ hg merge 1 | |
209 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
210 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
210 | (branch merge, don't forget to commit) |
|
211 | (branch merge, don't forget to commit) | |
211 |
|
212 | |||
212 | resolve --all should do nothing in merge without conflicts |
|
213 | resolve --all should do nothing in merge without conflicts | |
213 | $ hg resolve --all |
|
214 | $ hg resolve --all | |
214 | (no more unresolved files) |
|
215 | (no more unresolved files) | |
215 |
|
216 | |||
216 | resolve -m should do nothing in merge without conflicts |
|
217 | resolve -m should do nothing in merge without conflicts | |
217 |
|
218 | |||
218 | $ hg resolve -m |
|
219 | $ hg resolve -m | |
219 | (no more unresolved files) |
|
220 | (no more unresolved files) | |
220 |
|
221 | |||
221 | get back to conflicting state |
|
222 | get back to conflicting state | |
222 |
|
223 | |||
223 | $ hg up -qC 2 |
|
224 | $ hg up -qC 2 | |
224 | $ hg merge --tool=internal:fail 1 |
|
225 | $ hg merge --tool=internal:fail 1 | |
225 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
226 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
226 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
227 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
227 | [1] |
|
228 | [1] | |
228 |
|
229 | |||
229 | resolve without arguments should suggest --all |
|
230 | resolve without arguments should suggest --all | |
230 | $ hg resolve |
|
231 | $ hg resolve | |
231 | abort: no files or directories specified |
|
232 | abort: no files or directories specified | |
232 | (use --all to re-merge all unresolved files) |
|
233 | (use --all to re-merge all unresolved files) | |
233 | [255] |
|
234 | [255] | |
234 |
|
235 | |||
235 | resolve --all should re-merge all unresolved files |
|
236 | resolve --all should re-merge all unresolved files | |
236 | $ hg resolve --all |
|
237 | $ hg resolve --all | |
237 | merging file1 |
|
238 | merging file1 | |
238 | merging file2 |
|
239 | merging file2 | |
239 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
|
240 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') | |
240 | warning: conflicts while merging file2! (edit, then use 'hg resolve --mark') |
|
241 | warning: conflicts while merging file2! (edit, then use 'hg resolve --mark') | |
241 | [1] |
|
242 | [1] | |
242 | $ cat file1.orig |
|
243 | $ cat file1.orig | |
243 | foo |
|
244 | foo | |
244 | baz |
|
245 | baz | |
245 | $ cat file2.orig |
|
246 | $ cat file2.orig | |
246 | foo |
|
247 | foo | |
247 | baz |
|
248 | baz | |
248 |
|
249 | |||
249 | .orig files should exists where specified |
|
250 | .orig files should exists where specified | |
250 | $ hg resolve --all --verbose --config 'ui.origbackuppath=.hg/origbackups' |
|
251 | $ hg resolve --all --verbose --config 'ui.origbackuppath=.hg/origbackups' | |
251 | merging file1 |
|
252 | merging file1 | |
252 | creating directory: $TESTTMP/repo/.hg/origbackups |
|
253 | creating directory: $TESTTMP/repo/.hg/origbackups | |
253 | merging file2 |
|
254 | merging file2 | |
254 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
|
255 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') | |
255 | warning: conflicts while merging file2! (edit, then use 'hg resolve --mark') |
|
256 | warning: conflicts while merging file2! (edit, then use 'hg resolve --mark') | |
256 | [1] |
|
257 | [1] | |
257 | $ ls .hg/origbackups |
|
258 | $ ls .hg/origbackups | |
258 | file1 |
|
259 | file1 | |
259 | file2 |
|
260 | file2 | |
260 | $ grep '<<<' file1 > /dev/null |
|
261 | $ grep '<<<' file1 > /dev/null | |
261 | $ grep '<<<' file2 > /dev/null |
|
262 | $ grep '<<<' file2 > /dev/null | |
262 |
|
263 | |||
263 | resolve <file> should re-merge file |
|
264 | resolve <file> should re-merge file | |
264 | $ echo resolved > file1 |
|
265 | $ echo resolved > file1 | |
265 | $ hg resolve -q file1 |
|
266 | $ hg resolve -q file1 | |
266 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
|
267 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') | |
267 | [1] |
|
268 | [1] | |
268 | $ grep '<<<' file1 > /dev/null |
|
269 | $ grep '<<<' file1 > /dev/null | |
269 |
|
270 | |||
270 | test .orig behavior with resolve |
|
271 | test .orig behavior with resolve | |
271 |
|
272 | |||
272 | $ hg resolve -q file1 --tool "sh -c 'f --dump \"$TESTTMP/repo/file1.orig\"'" |
|
273 | $ hg resolve -q file1 --tool "sh -c 'f --dump \"$TESTTMP/repo/file1.orig\"'" | |
273 | $TESTTMP/repo/file1.orig: |
|
274 | $TESTTMP/repo/file1.orig: | |
274 | >>> |
|
275 | >>> | |
275 | foo |
|
276 | foo | |
276 | baz |
|
277 | baz | |
277 | <<< |
|
278 | <<< | |
278 |
|
279 | |||
279 | resolve <file> should do nothing if 'file' was marked resolved |
|
280 | resolve <file> should do nothing if 'file' was marked resolved | |
280 | $ echo resolved > file1 |
|
281 | $ echo resolved > file1 | |
281 | $ hg resolve -m file1 |
|
282 | $ hg resolve -m file1 | |
282 | $ hg resolve -q file1 |
|
283 | $ hg resolve -q file1 | |
283 | $ cat file1 |
|
284 | $ cat file1 | |
284 | resolved |
|
285 | resolved | |
285 |
|
286 | |||
286 | insert unsupported advisory merge record |
|
287 | insert unsupported advisory merge record | |
287 |
|
288 | |||
288 | $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -x |
|
289 | $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -x | |
289 | $ hg debugmergestate |
|
290 | $ hg debugmergestate | |
290 | * version 2 records |
|
291 | * version 2 records | |
291 | local: 57653b9f834a4493f7240b0681efcb9ae7cab745 |
|
292 | local: 57653b9f834a4493f7240b0681efcb9ae7cab745 | |
292 | other: dc77451844e37f03f5c559e3b8529b2b48d381d1 |
|
293 | other: dc77451844e37f03f5c559e3b8529b2b48d381d1 | |
293 | labels: |
|
294 | labels: | |
294 | local: working copy |
|
295 | local: working copy | |
295 | other: merge rev |
|
296 | other: merge rev | |
296 | unrecognized entry: x advisory record |
|
297 | unrecognized entry: x advisory record | |
297 | file extras: file1 (ancestorlinknode = 99726c03216e233810a2564cbc0adfe395007eac) |
|
298 | file extras: file1 (ancestorlinknode = 99726c03216e233810a2564cbc0adfe395007eac) | |
298 | file: file1 (record type "F", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
299 | file: file1 (record type "F", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
299 | local path: file1 (flags "") |
|
300 | local path: file1 (flags "") | |
300 | ancestor path: file1 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) |
|
301 | ancestor path: file1 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) | |
301 | other path: file1 (node 6f4310b00b9a147241b071a60c28a650827fb03d) |
|
302 | other path: file1 (node 6f4310b00b9a147241b071a60c28a650827fb03d) | |
302 | file extras: file2 (ancestorlinknode = 99726c03216e233810a2564cbc0adfe395007eac) |
|
303 | file extras: file2 (ancestorlinknode = 99726c03216e233810a2564cbc0adfe395007eac) | |
303 | file: file2 (record type "F", state "u", hash cb99b709a1978bd205ab9dfd4c5aaa1fc91c7523) |
|
304 | file: file2 (record type "F", state "u", hash cb99b709a1978bd205ab9dfd4c5aaa1fc91c7523) | |
304 | local path: file2 (flags "") |
|
305 | local path: file2 (flags "") | |
305 | ancestor path: file2 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) |
|
306 | ancestor path: file2 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) | |
306 | other path: file2 (node 6f4310b00b9a147241b071a60c28a650827fb03d) |
|
307 | other path: file2 (node 6f4310b00b9a147241b071a60c28a650827fb03d) | |
307 | $ hg resolve -l |
|
308 | $ hg resolve -l | |
308 | R file1 |
|
309 | R file1 | |
309 | U file2 |
|
310 | U file2 | |
310 |
|
311 | |||
311 | insert unsupported mandatory merge record |
|
312 | insert unsupported mandatory merge record | |
312 |
|
313 | |||
313 | $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -X |
|
314 | $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -X | |
314 | $ hg debugmergestate |
|
315 | $ hg debugmergestate | |
315 | * version 2 records |
|
316 | * version 2 records | |
316 | local: 57653b9f834a4493f7240b0681efcb9ae7cab745 |
|
317 | local: 57653b9f834a4493f7240b0681efcb9ae7cab745 | |
317 | other: dc77451844e37f03f5c559e3b8529b2b48d381d1 |
|
318 | other: dc77451844e37f03f5c559e3b8529b2b48d381d1 | |
318 | labels: |
|
319 | labels: | |
319 | local: working copy |
|
320 | local: working copy | |
320 | other: merge rev |
|
321 | other: merge rev | |
321 | file extras: file1 (ancestorlinknode = 99726c03216e233810a2564cbc0adfe395007eac) |
|
322 | file extras: file1 (ancestorlinknode = 99726c03216e233810a2564cbc0adfe395007eac) | |
322 | file: file1 (record type "F", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
323 | file: file1 (record type "F", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
323 | local path: file1 (flags "") |
|
324 | local path: file1 (flags "") | |
324 | ancestor path: file1 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) |
|
325 | ancestor path: file1 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) | |
325 | other path: file1 (node 6f4310b00b9a147241b071a60c28a650827fb03d) |
|
326 | other path: file1 (node 6f4310b00b9a147241b071a60c28a650827fb03d) | |
326 | file extras: file2 (ancestorlinknode = 99726c03216e233810a2564cbc0adfe395007eac) |
|
327 | file extras: file2 (ancestorlinknode = 99726c03216e233810a2564cbc0adfe395007eac) | |
327 | file: file2 (record type "F", state "u", hash cb99b709a1978bd205ab9dfd4c5aaa1fc91c7523) |
|
328 | file: file2 (record type "F", state "u", hash cb99b709a1978bd205ab9dfd4c5aaa1fc91c7523) | |
328 | local path: file2 (flags "") |
|
329 | local path: file2 (flags "") | |
329 | ancestor path: file2 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) |
|
330 | ancestor path: file2 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) | |
330 | other path: file2 (node 6f4310b00b9a147241b071a60c28a650827fb03d) |
|
331 | other path: file2 (node 6f4310b00b9a147241b071a60c28a650827fb03d) | |
331 | unrecognized entry: X mandatory record |
|
332 | unrecognized entry: X mandatory record | |
332 | $ hg resolve -l |
|
333 | $ hg resolve -l | |
333 | abort: unsupported merge state records: X |
|
334 | abort: unsupported merge state records: X | |
334 | (see https://mercurial-scm.org/wiki/MergeStateRecords for more information) |
|
335 | (see https://mercurial-scm.org/wiki/MergeStateRecords for more information) | |
335 | [255] |
|
336 | [255] | |
336 | $ hg resolve -ma |
|
337 | $ hg resolve -ma | |
337 | abort: unsupported merge state records: X |
|
338 | abort: unsupported merge state records: X | |
338 | (see https://mercurial-scm.org/wiki/MergeStateRecords for more information) |
|
339 | (see https://mercurial-scm.org/wiki/MergeStateRecords for more information) | |
339 | [255] |
|
340 | [255] | |
340 | $ hg summary |
|
341 | $ hg summary | |
341 | warning: merge state has unsupported record types: X |
|
342 | warning: merge state has unsupported record types: X | |
342 | parent: 2:57653b9f834a |
|
343 | parent: 2:57653b9f834a | |
343 | append baz to files |
|
344 | append baz to files | |
344 | parent: 1:dc77451844e3 |
|
345 | parent: 1:dc77451844e3 | |
345 | append bar to files |
|
346 | append bar to files | |
346 | branch: default |
|
347 | branch: default | |
347 | commit: 2 modified, 2 unknown (merge) |
|
348 | commit: 2 modified, 2 unknown (merge) | |
348 | update: 2 new changesets (update) |
|
349 | update: 2 new changesets (update) | |
349 | phases: 5 draft |
|
350 | phases: 5 draft | |
350 |
|
351 | |||
351 | update --clean shouldn't abort on unsupported records |
|
352 | update --clean shouldn't abort on unsupported records | |
352 |
|
353 | |||
353 | $ hg up -qC 1 |
|
354 | $ hg up -qC 1 | |
354 | $ hg debugmergestate |
|
355 | $ hg debugmergestate | |
355 | no merge state found |
|
356 | no merge state found | |
356 |
|
357 | |||
357 | test crashed merge with empty mergestate |
|
358 | test crashed merge with empty mergestate | |
358 |
|
359 | |||
359 | $ mkdir .hg/merge |
|
360 | $ mkdir .hg/merge | |
360 | $ touch .hg/merge/state |
|
361 | $ touch .hg/merge/state | |
361 |
|
362 | |||
362 | resolve -l should be empty |
|
363 | resolve -l should be empty | |
363 |
|
364 | |||
364 | $ hg resolve -l |
|
365 | $ hg resolve -l | |
365 |
|
366 | |||
366 | $ cd .. |
|
367 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now