##// END OF EJS Templates
errors: add config that lets user get more detailed exit codes...
Martin von Zweigbergk -
r46430:21733e8c default
parent child Browse files
Show More
@@ -0,0 +1,49 b''
1 Tests that the exit code is as expected when ui.detailed-exit-code is *not*
2 enabled.
3
4 $ cat >> $HGRCPATH << EOF
5 > [ui]
6 > detailed-exit-code=no
7 > EOF
8
9 $ hg init
10 $ echo a > a
11 Expect exit code 0 on success
12 $ hg ci -Aqm initial
13
14 $ hg co nonexistent
15 abort: unknown revision 'nonexistent'!
16 [255]
17
18 $ hg co 'none()'
19 abort: empty revision set
20 [255]
21
22 $ hg co 'invalid('
23 hg: parse error at 8: not a prefix: end
24 (invalid(
25 ^ here)
26 [255]
27
28 $ hg co 'invalid('
29 hg: parse error at 8: not a prefix: end
30 (invalid(
31 ^ here)
32 [255]
33
34 $ hg continue
35 abort: no operation in progress
36 [255]
37
38 $ hg st --config a=b
39 abort: malformed --config option: 'a=b' (use --config section.name=value)
40 [255]
41
42 $ echo b > a
43 $ hg ci -m second
44 $ echo c > a
45 $ hg ci -m third
46 $ hg --config extensions.rebase= rebase -r . -d 0 -q
47 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
48 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
49 [1]
@@ -1307,6 +1307,9 b' coreconfigitem('
1307 1307 b'ui', b'editor', default=dynamicdefault,
1308 1308 )
1309 1309 coreconfigitem(
1310 b'ui', b'detailed-exit-code', default=False, experimental=True,
1311 )
1312 coreconfigitem(
1310 1313 b'ui', b'fallbackencoding', default=None,
1311 1314 )
1312 1315 coreconfigitem(
@@ -148,6 +148,8 b' def callcatch(ui, func):'
148 148 return func() if no exception happens. otherwise do some error handling
149 149 and return an exit code accordingly. does not handle all exceptions.
150 150 """
151 coarse_exit_code = -1
152 detailed_exit_code = -1
151 153 try:
152 154 try:
153 155 return func()
@@ -212,7 +214,8 b' def callcatch(ui, func):'
212 214 ui.error(b"%s\n" % inst)
213 215 if inst.hint:
214 216 ui.error(_(b"(%s)\n") % inst.hint)
215 return 1
217 detailed_exit_code = 240
218 coarse_exit_code = 1
216 219 except error.WdirUnsupported:
217 220 ui.error(_(b"abort: working directory revision cannot be specified\n"))
218 221 except error.Abort as inst:
@@ -266,9 +269,13 b' def callcatch(ui, func):'
266 269 except SystemExit as inst:
267 270 # Commands shouldn't sys.exit directly, but give a return code.
268 271 # Just in case catch this and and pass exit code to caller.
269 return inst.code
272 detailed_exit_code = 254
273 coarse_exit_code = inst.code
270 274
271 return -1
275 if ui.configbool(b'ui', b'detailed-exit-code'):
276 return detailed_exit_code
277 else:
278 return coarse_exit_code
272 279
273 280
274 281 def checknewlabel(repo, lbl, kind):
@@ -60,6 +60,8 b' urlreq = util.urlreq'
60 60 # The config knobs that will be altered (if unset) by ui.tweakdefaults.
61 61 tweakrc = b"""
62 62 [ui]
63 # Gives detailed exit codes for input/user errors, config errors, etc.
64 detailed-exit-code = True
63 65 # The rollback command is dangerous. As a rule, don't use it.
64 66 rollback = False
65 67 # Make `hg status` report copy information
@@ -1439,6 +1439,7 b' class Test(unittest.TestCase):'
1439 1439 hgrc.write(b'[ui]\n')
1440 1440 hgrc.write(b'slash = True\n')
1441 1441 hgrc.write(b'interactive = False\n')
1442 hgrc.write(b'detailed-exit-code = True\n')
1442 1443 hgrc.write(b'merge = internal:merge\n')
1443 1444 hgrc.write(b'mergemarkers = detailed\n')
1444 1445 hgrc.write(b'promptecho = True\n')
@@ -21,7 +21,7 b' Abort absorb if there is an unfinished o'
21 21 merging foo.whole
22 22 warning: conflicts while merging foo.whole! (edit, then use 'hg resolve --mark')
23 23 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
24 [1]
24 [240]
25 25
26 26 $ hg --config extensions.rebase= absorb
27 27 abort: rebase in progress
@@ -9,6 +9,7 b' Create a repository:'
9 9 lfs.usercache=$TESTTMP/.cache/lfs
10 10 ui.slash=True
11 11 ui.interactive=False
12 ui.detailed-exit-code=True
12 13 ui.merge=internal:merge
13 14 ui.mergemarkers=detailed
14 15 ui.promptecho=True
@@ -81,7 +81,7 b' aborted rebase should restore active boo'
81 81 merging d
82 82 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
83 83 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
84 [1]
84 [240]
85 85 $ hg rebase --abort
86 86 rebase aborted
87 87 $ hg bookmark
@@ -96,7 +96,7 b' after aborted rebase, restoring a bookma'
96 96 merging d
97 97 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
98 98 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
99 [1]
99 [240]
100 100 $ hg bookmark -d three
101 101 $ hg rebase --abort
102 102 rebase aborted
@@ -211,6 +211,7 b' check that local configs for the cached '
211 211 lfs.usercache=$TESTTMP/.cache/lfs
212 212 ui.slash=True
213 213 ui.interactive=False
214 ui.detailed-exit-code=True
214 215 ui.merge=internal:merge
215 216 ui.mergemarkers=detailed
216 217 ui.foo=bar
@@ -222,6 +223,7 b' check that local configs for the cached '
222 223 *** runcommand -R foo showconfig ui defaults
223 224 ui.slash=True
224 225 ui.interactive=False
226 ui.detailed-exit-code=True
225 227 ui.merge=internal:merge
226 228 ui.mergemarkers=detailed
227 229 ui.nontty=true
@@ -92,7 +92,7 b' Make sure filename heuristics do not whe'
92 92 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
93 93 What do you want to do? u
94 94 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
95 [1]
95 [240]
96 96
97 97 $ cd ..
98 98 $ rm -rf repo
@@ -249,7 +249,7 b' With small limit'
249 249 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
250 250 What do you want to do? u
251 251 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
252 [1]
252 [240]
253 253
254 254 $ hg rebase --abort
255 255 rebase aborted
@@ -711,7 +711,7 b' When the sourcecommitlimit is small and '
711 711 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
712 712 What do you want to do? u
713 713 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
714 [1]
714 [240]
715 715
716 716 But when we have "sourcecommitlimit > (no. of drafts from base to c1)", we do
717 717 fullcopytracing
@@ -869,7 +869,7 b' fixing the working directory if there ar'
869 869 merging foo.whole
870 870 warning: conflicts while merging foo.whole! (edit, then use 'hg resolve --mark')
871 871 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
872 [1]
872 [240]
873 873
874 874 $ hg --config extensions.rebase= fix --working-dir
875 875 abort: unresolved conflicts
@@ -151,7 +151,7 b' temporarily.'
151 151 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 152 Editing (08d98a8350f3), you may commit or record as needed now.
153 153 (hg histedit --continue to resume)
154 [1]
154 [240]
155 155
156 156 $ hg graft --continue
157 157 abort: no graft in progress
@@ -337,7 +337,7 b' Test --continue with --keep'
337 337 > EOF
338 338 Editing (eb57da33312f), you may commit or record as needed now.
339 339 (hg histedit --continue to resume)
340 [1]
340 [240]
341 341 $ echo edit >> alpha
342 342 $ hg histedit -q --continue
343 343 $ hg log -G -T '{rev}:{node|short} {desc}'
@@ -364,7 +364,7 b' Test that abort fails gracefully on exce'
364 364 > EOF
365 365 Editing (8fda0c726bf2), you may commit or record as needed now.
366 366 (hg histedit --continue to resume)
367 [1]
367 [240]
368 368 Corrupt histedit state file
369 369 $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit
370 370 $ mv ../corrupt-histedit .hg/histedit-state
@@ -489,7 +489,7 b' in which case this test should be revisi'
489 489 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
490 490 Fix up the change (pick 8cde254db839)
491 491 (hg histedit --continue to resume)
492 [1]
492 [240]
493 493 $ hg resolve -m --all
494 494 (no more unresolved files)
495 495 continue: hg histedit --continue
@@ -498,7 +498,7 b' in which case this test should be revisi'
498 498 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
499 499 Editing (6f2f0241f119), you may commit or record as needed now.
500 500 (hg histedit --continue to resume)
501 [1]
501 [240]
502 502 $ hg resolve -m --all
503 503 (no more unresolved files)
504 504 continue: hg histedit --continue
@@ -437,7 +437,7 b' rollback should not work after a histedi'
437 437 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
438 438 Editing (cb9a9f314b8b), you may commit or record as needed now.
439 439 (hg histedit --continue to resume)
440 [1]
440 [240]
441 441 $ HGEDITOR=true hg histedit --continue
442 442 saved backup bundle to $TESTTMP/r0/.hg/strip-backup/cb9a9f314b8b-cc5ccb0b-histedit.hg
443 443
@@ -291,7 +291,7 b' folded content is dropped during a merge'
291 291 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
292 292 Fix up the change (fold 251d831eeec5)
293 293 (hg histedit --continue to resume)
294 [1]
294 [240]
295 295 There were conflicts, we keep P1 content. This
296 296 should effectively drop the changes from +6.
297 297
@@ -364,7 +364,7 b' dropped revision.'
364 364 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
365 365 Fix up the change (fold 251d831eeec5)
366 366 (hg histedit --continue to resume)
367 [1]
367 [240]
368 368 $ cat > file << EOF
369 369 > 1
370 370 > 2
@@ -52,7 +52,7 b' Test when `backup-bundle` config option '
52 52 merging file
53 53 Editing (7d5187087c79), you may commit or record as needed now.
54 54 (hg histedit --continue to resume)
55 [1]
55 [240]
56 56 $ hg abort
57 57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 58 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/1d8f701c7b35-cf7be322-backup.hg
@@ -74,7 +74,7 b' Enable config option:'
74 74 merging file
75 75 Editing (7d5187087c79), you may commit or record as needed now.
76 76 (hg histedit --continue to resume)
77 [1]
77 [240]
78 78
79 79 $ hg abort
80 80 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -45,7 +45,7 b' Test that histedit learns about obsolesc'
45 45 $ hg histedit -r 'all()' --commands plan
46 46 Editing (1b2d564fad96), you may commit or record as needed now.
47 47 (hg histedit --continue to resume)
48 [1]
48 [240]
49 49 $ hg st
50 50 A b
51 51 A c
@@ -72,7 +72,7 b' With some node gone missing during the e'
72 72 $ hg histedit -r 'all()' --commands plan
73 73 Editing (49d44ab2be1b), you may commit or record as needed now.
74 74 (hg histedit --continue to resume)
75 [1]
75 [240]
76 76 $ hg st
77 77 A b
78 78 A d
@@ -227,7 +227,7 b' Test that rewriting leaving instability '
227 227 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
228 228 Editing (b346ab9a313d), you may commit or record as needed now.
229 229 (hg histedit --continue to resume)
230 [1]
230 [240]
231 231 $ echo c >> c
232 232 $ hg histedit --continue
233 233 1 new orphan changesets
@@ -361,7 +361,7 b' New-commit as draft (default)'
361 361 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
362 362 Editing (b449568bf7fc), you may commit or record as needed now.
363 363 (hg histedit --continue to resume)
364 [1]
364 [240]
365 365 $ echo f >> f
366 366 $ hg histedit --continue
367 367 $ hg log -G
@@ -403,7 +403,7 b' New-commit as secret (config)'
403 403 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
404 404 Editing (b449568bf7fc), you may commit or record as needed now.
405 405 (hg histedit --continue to resume)
406 [1]
406 [240]
407 407 $ echo f >> f
408 408 $ hg histedit --continue
409 409 $ hg log -G
@@ -529,7 +529,7 b' attempted later.'
529 529 > EOF
530 530 Editing (ee118ab9fa44), you may commit or record as needed now.
531 531 (hg histedit --continue to resume)
532 [1]
532 [240]
533 533
534 534 #if abortcommand
535 535 when in dry-run mode
@@ -568,7 +568,7 b' when in dry-run mode'
568 568 > EOF
569 569 Editing (ee118ab9fa44), you may commit or record as needed now.
570 570 (hg histedit --continue to resume)
571 [1]
571 [240]
572 572 $ hg histedit --continue --config experimental.evolution.track-operation=1
573 573 $ hg log -G
574 574 @ 23:175d6b286a22 (secret) k
@@ -594,7 +594,7 b' it is aborted by conflict.'
594 594 merging normal1
595 595 warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark')
596 596 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
597 [1]
597 [240]
598 598 $ cat .hglf/large1
599 599 58e24f733a964da346e2407a2bee99d9001184f5
600 600 $ cat large1
@@ -762,7 +762,7 b' added:'
762 762 > hgext.largefiles.lfutil.getlfilestoupdate = getlfilestoupdate
763 763 > EOF
764 764 $ hg up -Cr "8" --config extensions.crashupdatelfiles=../crashupdatelfiles.py
765 [7]
765 [254]
766 766 Check large1 content and status ... and that update will undo modifications:
767 767 $ cat large1
768 768 large1 in #3
@@ -28,7 +28,7 b' Testing on-failure=continue'
28 28 merging a failed!
29 29 merging b failed!
30 30 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
31 [1]
31 [240]
32 32
33 33 $ hg resolve --list
34 34 U a
@@ -45,7 +45,7 b' Testing on-failure=halt'
45 45 merging b
46 46 merging a failed!
47 47 merge halted after failed merge (see hg resolve)
48 [1]
48 [240]
49 49
50 50 $ hg resolve --list
51 51 U a
@@ -73,7 +73,7 b' Testing on-failure=prompt'
73 73 merging b failed!
74 74 continue merge operation (yn)? n
75 75 merge halted after failed merge (see hg resolve)
76 [1]
76 [240]
77 77
78 78 $ hg resolve --list
79 79 U a
@@ -102,7 +102,7 b' Check that successful tool with failed p'
102 102 merging b failed!
103 103 continue merge operation (yn)? n
104 104 merge halted after failed merge (see hg resolve)
105 [1]
105 [240]
106 106
107 107 $ hg resolve --list
108 108 R a
@@ -125,7 +125,7 b' Check that conflicts with conflict check'
125 125 merging b
126 126 merging a failed!
127 127 merge halted after failed merge (see hg resolve)
128 [1]
128 [240]
129 129
130 130 $ hg resolve --list
131 131 U a
@@ -146,7 +146,7 b' Check that always-prompt also can halt t'
146 146 was merge of 'b' successful (yn)? n
147 147 merging b failed!
148 148 merge halted after failed merge (see hg resolve)
149 [1]
149 [240]
150 150
151 151 $ hg resolve --list
152 152 R a
@@ -458,7 +458,7 b' qrecord should throw an error when histe'
458 458 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
459 459 Editing (ea55e2ae468f), you may commit or record as needed now.
460 460 (hg histedit --continue to resume)
461 [1]
461 [240]
462 462 $ echo 'foo bar' > a
463 463 $ hg qrecord -d '0 0' -m aaa a.patch <<EOF
464 464 > y
@@ -82,7 +82,7 b' Conflicting rebase:'
82 82 merging common
83 83 warning: conflicts while merging common! (edit, then use 'hg resolve --mark')
84 84 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
85 [1]
85 [240]
86 86
87 87 Insert unsupported advisory merge record:
88 88
@@ -149,7 +149,7 b' earlier than 2.7 by renaming ".hg/rebase'
149 149 merging common
150 150 warning: conflicts while merging common! (edit, then use 'hg resolve --mark')
151 151 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
152 [1]
152 [240]
153 153
154 154 $ mv .hg/rebasestate .hg/rebasestate.back
155 155 $ hg update --quiet --clean 2
@@ -219,7 +219,7 b' Rebase and abort without generating new '
219 219 merging c
220 220 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
221 221 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
222 [1]
222 [240]
223 223
224 224 $ hg tglog
225 225 % 4:draft 'C1'
@@ -278,7 +278,7 b' rebase abort should not leave working co'
278 278 merging c
279 279 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
280 280 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
281 [1]
281 [240]
282 282 $ hg abort
283 283 rebase aborted
284 284 $ hg log -G --template "{rev} {desc} {bookmarks}"
@@ -316,7 +316,7 b' user has somehow managed to update to a '
316 316 $ hg rebase -d @ -b foo --tool=internal:fail
317 317 rebasing 2:070cf4580bb5 foo tip "b2"
318 318 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
319 [1]
319 [240]
320 320
321 321 $ mv .hg/rebasestate ./ # so we're allowed to hg up like in mercurial <2.6.3
322 322 $ hg up -C 0 # user does other stuff in the repo
@@ -463,7 +463,7 b' during a rebase (issue4661)'
463 463 $ hg rebase -d 1 --tool 'internal:fail'
464 464 rebasing 2:e4ea5cdc9789 "conflicting 1"
465 465 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
466 [1]
466 [240]
467 467 $ hg abort
468 468 rebase aborted
469 469 $ hg summary
@@ -504,7 +504,7 b' commit will cause merge conflict on reba'
504 504 note: not rebasing 3:0682fd3dabf5 "disappear draft", its destination already has all its changes
505 505 warning: conflicts while merging root! (edit, then use 'hg resolve --mark')
506 506 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
507 [1]
507 [240]
508 508 $ hg abort
509 509 rebase aborted
510 510 $ cd ..
@@ -127,7 +127,7 b' When backup-bundle = True:'
127 127 merging c
128 128 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
129 129 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
130 [1]
130 [240]
131 131 $ hg rebase --abort
132 132 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/818c1a43c916-2b644d96-backup.hg
133 133 rebase aborted
@@ -143,7 +143,7 b' When backup-bundle = False:'
143 143 merging c
144 144 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
145 145 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
146 [1]
146 [240]
147 147 $ hg rebase --abort
148 148 rebase aborted
149 149 $ cd ..
@@ -173,7 +173,7 b' rebase --continue with bookmarks present'
173 173 merging c
174 174 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
175 175 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
176 [1]
176 [240]
177 177 $ echo 'c' > c
178 178 $ hg resolve --mark c
179 179 (no more unresolved files)
@@ -70,7 +70,7 b' Rebasing B onto E - check keep: and phas'
70 70 merging A
71 71 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
72 72 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
73 [1]
73 [240]
74 74
75 75 Solve the conflict and go on:
76 76
@@ -127,7 +127,7 b' Rebase F onto E - check keepbranches:'
127 127 merging A
128 128 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
129 129 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
130 [1]
130 [240]
131 131
132 132 Solve the conflict and go on:
133 133
@@ -292,7 +292,7 b' Preserves external parent'
292 292 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
293 293 What do you want to do? u
294 294 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
295 [1]
295 [240]
296 296
297 297 $ echo F > E
298 298 $ hg resolve -m
@@ -659,7 +659,7 b' running into merge conflict and invoking'
659 659 merging A
660 660 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
661 661 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
662 [1]
662 [240]
663 663 $ rm A.orig
664 664 $ hg resolve --mark A
665 665 (no more unresolved files)
@@ -706,7 +706,7 b' Test aborted editor on final message'
706 706 merging A
707 707 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
708 708 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
709 [1]
709 [240]
710 710 $ hg tglog
711 711 o 3: 63668d570d21 'C'
712 712 |
@@ -734,7 +734,7 b' Test aborted editor on final message'
734 734 merging A
735 735 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
736 736 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
737 [1]
737 [240]
738 738 $ hg tglog
739 739 % 3: 63668d570d21 'C'
740 740 |
@@ -67,7 +67,7 b' Conflicting rebase:'
67 67 merging common
68 68 warning: conflicts while merging common! (edit, then use 'hg resolve --mark')
69 69 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
70 [1]
70 [240]
71 71
72 72 $ hg status --config commands.status.verbose=1
73 73 M common
@@ -345,7 +345,7 b' Test minimization of merge conflicts'
345 345 merging a
346 346 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
347 347 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
348 [1]
348 [240]
349 349 $ hg diff
350 350 diff -r 328e4ab1f7cc a
351 351 --- a/a Thu Jan 01 00:00:00 1970 +0000
@@ -365,7 +365,7 b' Test minimization of merge conflicts'
365 365 merging a
366 366 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
367 367 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
368 [1]
368 [240]
369 369 $ hg diff
370 370 diff -r 328e4ab1f7cc a
371 371 --- a/a Thu Jan 01 00:00:00 1970 +0000
@@ -403,7 +403,7 b' Test rebase with obsstore turned on and '
403 403 merging B
404 404 warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
405 405 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
406 [1]
406 [240]
407 407
408 408 $ echo 4 > B
409 409 $ hg resolve -m
@@ -455,7 +455,7 b' Test where the conflict happens when reb'
455 455 merging conflict
456 456 warning: conflicts while merging conflict! (edit, then use 'hg resolve --mark')
457 457 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
458 [1]
458 [240]
459 459 $ hg tglog
460 460 @ 8:draft 'E'
461 461 |
@@ -49,7 +49,7 b' Requiring dest should not break continue'
49 49 merging c
50 50 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
51 51 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
52 [1]
52 [240]
53 53 $ echo d > c
54 54 $ hg resolve --mark --all
55 55 (no more unresolved files)
@@ -298,7 +298,7 b' Ensure --continue restores a correct sta'
298 298 merging B
299 299 warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
300 300 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
301 [1]
301 [240]
302 302 $ hg resolve --all -t internal:local
303 303 (no more unresolved files)
304 304 continue: hg rebase --continue
@@ -465,7 +465,7 b' In-memory rebase that fails due to merge'
465 465 merging e
466 466 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
467 467 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
468 [1]
468 [240]
469 469 $ hg rebase --abort
470 470 saved backup bundle to $TESTTMP/repo3/.hg/strip-backup/c1e524d4287c-f91f82e1-backup.hg
471 471 rebase aborted
@@ -856,7 +856,7 b' Test rebasing when the file we are mergi'
856 856 merging foo
857 857 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
858 858 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
859 [1]
859 [240]
860 860
861 861 $ cd $TESTTMP
862 862
@@ -889,7 +889,7 b" Test rebasing when we're in the middle o"
889 889 merging foo
890 890 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
891 891 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
892 [1]
892 [240]
893 893 $ hg rebase -r 3 -d 1 -t:merge3
894 894 abort: rebase in progress
895 895 (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop')
@@ -62,7 +62,7 b' Rebasing B onto E:'
62 62 merging A
63 63 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
64 64 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
65 [1]
65 [240]
66 66
67 67 Force a commit on C during the interruption:
68 68
@@ -99,7 +99,7 b' Resume the rebasing:'
99 99 merging A
100 100 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
101 101 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
102 [1]
102 [240]
103 103
104 104 Solve the conflict and go on:
105 105
@@ -158,7 +158,7 b' Rebasing B onto E:'
158 158 merging A
159 159 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
160 160 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
161 [1]
161 [240]
162 162
163 163 Force a commit on B' during the interruption:
164 164
@@ -230,7 +230,7 b' Rebasing B onto E:'
230 230 merging A
231 231 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
232 232 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
233 [1]
233 [240]
234 234
235 235 Change phase on B and B'
236 236
@@ -303,7 +303,7 b' Continue rebase after upgrading from an '
303 303 merging A
304 304 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
305 305 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
306 [1]
306 [240]
307 307 $ hg tglog
308 308 @ 5: 45396c49d53b 'B'
309 309 |
@@ -506,7 +506,7 b' Make sure merge state is cleaned up afte'
506 506 merging a
507 507 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
508 508 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
509 [1]
509 [240]
510 510 $ echo a > a
511 511 $ echo c >> a
512 512 $ hg resolve --mark a
@@ -526,7 +526,7 b' Now try again with --collapse'
526 526 merging a
527 527 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
528 528 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
529 [1]
529 [240]
530 530 $ echo a > a
531 531 $ echo c >> a
532 532 $ hg resolve --mark a
@@ -156,7 +156,7 b' already has one local mq patch'
156 156 note: not rebasing 3:6ff5b8feed8e r3 "r3", its destination already has all its changes
157 157 rebasing 4:094320fec554 r4 "r4"
158 158 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
159 [1]
159 [240]
160 160
161 161 $ HGMERGE=internal:local hg resolve --all
162 162 (no more unresolved files)
@@ -63,7 +63,7 b' Rebase - generate a conflict:'
63 63 merging f
64 64 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
65 65 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
66 [1]
66 [240]
67 67
68 68 Fix the 1st conflict:
69 69
@@ -77,7 +77,7 b' Fix the 1st conflict:'
77 77 merging f
78 78 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
79 79 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
80 [1]
80 [240]
81 81
82 82 Fix the 2nd conflict:
83 83
@@ -1033,7 +1033,7 b' Create the changes that we will rebase'
1033 1033 merging willconflict
1034 1034 warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark')
1035 1035 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
1036 [1]
1036 [240]
1037 1037
1038 1038 $ hg resolve --mark willconflict
1039 1039 (no more unresolved files)
@@ -1788,7 +1788,7 b' rebasestate may contain hidden hashes. "'
1788 1788 merging D
1789 1789 warning: conflicts while merging D! (edit, then use 'hg resolve --mark')
1790 1790 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
1791 [1]
1791 [240]
1792 1792
1793 1793 $ cp -R . $TESTTMP/hidden-state2
1794 1794
@@ -1875,7 +1875,7 b' Test --stop option |'
1875 1875 merging d
1876 1876 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
1877 1877 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
1878 [1]
1878 [240]
1879 1879 $ hg rebase --stop
1880 1880 1 new orphan changesets
1881 1881 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
@@ -1937,7 +1937,7 b' Test it aborts if unstable csets is not '
1937 1937 merging d
1938 1938 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
1939 1939 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
1940 [1]
1940 [240]
1941 1941 $ hg rebase --stop
1942 1942 abort: cannot remove original changesets with unrebased descendants
1943 1943 (either enable obsmarkers to allow unstable revisions or use --keep to keep original changesets)
@@ -1955,7 +1955,7 b' Test --stop when --keep is passed:'
1955 1955 merging d
1956 1956 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
1957 1957 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
1958 [1]
1958 [240]
1959 1959 $ hg rebase --stop
1960 1960 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
1961 1961 o 7:7fffad344617 test
@@ -2017,7 +2017,7 b' Test --stop aborts when --collapse was p'
2017 2017 merging d
2018 2018 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
2019 2019 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
2020 [1]
2020 [240]
2021 2021 $ hg rebase --stop
2022 2022 abort: cannot stop in --collapse session
2023 2023 [255]
@@ -2050,7 +2050,7 b' Test --stop raise errors with conflictin'
2050 2050 merging d
2051 2051 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
2052 2052 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
2053 [1]
2053 [240]
2054 2054 $ hg rebase --stop --dry-run
2055 2055 abort: cannot specify both --stop and --dry-run
2056 2056 [255]
@@ -2118,7 +2118,7 b' Test --stop moves bookmarks of original '
2118 2118 merging d
2119 2119 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
2120 2120 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
2121 [1]
2121 [240]
2122 2122 $ hg rebase --stop
2123 2123 1 new orphan changesets
2124 2124 $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n"
@@ -480,7 +480,7 b' Test --tool parameter:'
480 480 $ hg rebase -s 2 -d 1 --tool internal:fail
481 481 rebasing 2:e4e3f3546619 tip "c2b"
482 482 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
483 [1]
483 [240]
484 484
485 485 $ hg summary
486 486 parent: 1:56daeba07f4b
@@ -85,7 +85,7 b" Abort doesn't lose the commits that were"
85 85 merging file
86 86 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
87 87 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
88 [1]
88 [240]
89 89 $ hg rebase --abort
90 90 rebase aborted
91 91 $ hg tglog
@@ -90,7 +90,7 b' Abort pull early if another operation (h'
90 90 > EOF
91 91 Editing (d80cc2da061e), you may commit or record as needed now.
92 92 (hg histedit --continue to resume)
93 [1]
93 [240]
94 94 $ hg pull --rebase
95 95 abort: histedit in progress
96 96 (use 'hg histedit --continue' or 'hg histedit --abort')
@@ -108,7 +108,7 b' continued'
108 108 merging conflict
109 109 warning: conflicts while merging conflict! (edit, then use 'hg resolve --mark')
110 110 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
111 [1]
111 [240]
112 112 $ hg tglog
113 113 o 5: D
114 114 |
@@ -464,7 +464,7 b" Test 'hg resolve' confirm config option "
464 464 warning: conflicts while merging emp2! (edit, then use 'hg resolve --mark')
465 465 warning: conflicts while merging emp3! (edit, then use 'hg resolve --mark')
466 466 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
467 [1]
467 [240]
468 468
469 469 Test when commands.resolve.confirm config option is not set:
470 470 ===========================================================
@@ -366,7 +366,7 b' force a conflicted merge to occur'
366 366 merging a/a
367 367 warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark')
368 368 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
369 [1]
369 [240]
370 370 $ hg status -v
371 371 M a/a
372 372 M b.rename/b
@@ -484,7 +484,7 b' redo the unshelve to get a conflict'
484 484 $ hg unshelve -q
485 485 warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark')
486 486 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
487 [1]
487 [240]
488 488
489 489 attempt to continue
490 490
@@ -705,7 +705,7 b' Recreate some conflict again'
705 705 merging a/a
706 706 warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark')
707 707 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
708 [1]
708 [240]
709 709 $ hg bookmark
710 710 test (4|13):33f7f61e6c5e (re)
711 711
@@ -1387,7 +1387,7 b' Abort unshelve while merging (issue5123)'
1387 1387 warning: conflicts while merging bar1! (edit, then use 'hg resolve --mark')
1388 1388 warning: conflicts while merging bar2! (edit, then use 'hg resolve --mark')
1389 1389 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
1390 [1]
1390 [240]
1391 1391
1392 1392 $ cat > bar1 <<EOF
1393 1393 > A
@@ -219,7 +219,7 b' unshelve and conflicts with tracked and '
219 219 merging f
220 220 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
221 221 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
222 [1]
222 [240]
223 223
224 224 #if phasebased
225 225 $ hg log -G --template '{rev} {desc|firstline} {author} {date|isodate}'
@@ -290,7 +290,7 b' unshelve and conflicts with tracked and '
290 290 merging f
291 291 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
292 292 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
293 [1]
293 [240]
294 294 $ hg st
295 295 M f
296 296 ? f.orig
@@ -345,7 +345,7 b' test .orig files go where the user wants'
345 345 $ hg unshelve -q --config 'ui.origbackuppath=.hg/origbackups'
346 346 warning: conflicts while merging root! (edit, then use 'hg resolve --mark')
347 347 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
348 [1]
348 [240]
349 349 $ ls .hg/origbackups
350 350 root
351 351 $ rm -rf .hg/origbackups
@@ -563,7 +563,7 b' will be preserved.'
563 563 merging a
564 564 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
565 565 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
566 [1]
566 [240]
567 567 $ echo "aaabbbccc" > a
568 568 $ rm a.orig
569 569 $ hg resolve --mark a
@@ -637,7 +637,7 b' shelve on new branch, conflict with prev'
637 637 merging a
638 638 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
639 639 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
640 [1]
640 [240]
641 641
642 642 Removing restore branch information from shelvedstate file(making it looks like
643 643 in previous versions) and running unshelve --continue
@@ -715,7 +715,7 b' Prepare unshelve with a corrupted shelve'
715 715 merging file
716 716 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
717 717 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
718 [1]
718 [240]
719 719 $ echo somethingsomething > .hg/shelvedstate
720 720
721 721 Unshelve --continue fails with appropriate message if shelvedstate is corrupted
@@ -762,7 +762,7 b' Unshelve respects --keep even if user in'
762 762 merging file
763 763 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
764 764 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
765 [1]
765 [240]
766 766 $ hg resolve --mark file
767 767 (no more unresolved files)
768 768 continue: hg unshelve --continue
@@ -819,7 +819,7 b' New versions of Mercurial know how to re'
819 819 merging a
820 820 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
821 821 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
822 [1]
822 [240]
823 823 putting v1 shelvedstate file in place of a created v2
824 824 $ cat << EOF > .hg/shelvedstate
825 825 > 1
@@ -860,7 +860,7 b' Test with the `.shelve` missing, but the'
860 860 merging a
861 861 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
862 862 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
863 [1]
863 [240]
864 864 $ hg abort
865 865 unshelve of 'default' aborted
866 866
@@ -877,7 +877,7 b' Unshelve without .shelve metadata (can h'
877 877 merging a
878 878 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
879 879 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
880 [1]
880 [240]
881 881 $ cat .hg/shelved/default.shelve
882 882 node=82e0cb9893247d12667017593ce1e5655860f1ac
883 883 $ hg abort
@@ -905,7 +905,7 b' Block merge abort when unshelve in progr'
905 905 merging a
906 906 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
907 907 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
908 [1]
908 [240]
909 909
910 910 $ hg log --template '{desc|firstline} {author} {date|isodate} \n' -r .
911 911 pending changes temporary commit shelve@localhost 1970-01-01 00:00 +0000
@@ -934,7 +934,7 b' Demonstrate that the labels are correct '
934 934 $ hg unshelve -q
935 935 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
936 936 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
937 [1]
937 [240]
938 938 $ cat foo
939 939 r0
940 940 <<<<<<< working-copy: 0b2fcf2a90e9 - shelve: pending changes temporary commit
@@ -201,7 +201,7 b' Verify rebase conflicts pulls in the con'
201 201 warning: conflicts while merging backend.sparse! (edit, then use 'hg resolve --mark')
202 202 warning: conflicts while merging data.py! (edit, then use 'hg resolve --mark')
203 203 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
204 [1]
204 [240]
205 205 $ rm *.orig
206 206 $ ls -A
207 207 .hg
@@ -201,7 +201,7 b' Verify rebase temporarily includes exclu'
201 201 merging hide
202 202 warning: conflicts while merging hide! (edit, then use 'hg resolve --mark')
203 203 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
204 [1]
204 [240]
205 205
206 206 $ hg debugsparse
207 207 [exclude]
@@ -101,7 +101,7 b' Test extension of unfinished states supp'
101 101 merging file1
102 102 warning: conflicts while merging file1! (edit, then use 'hg resolve --mark')
103 103 unresolved conflicts (see 'hg resolve', then 'hg chainify --continue')
104 [1]
104 [240]
105 105 $ hg status --config commands.status.verbose=True
106 106 M file1
107 107 ? file1.orig
General Comments 0
You need to be logged in to leave comments. Login now