Show More
@@ -33,20 +33,20 b" def precheck(repo, revs, action=b'rewrit" | |||
|
33 | 33 | if node.nullrev in revs: |
|
34 | 34 | msg = _(b"cannot %s null changeset") % action |
|
35 | 35 | hint = _(b"no changeset checked out") |
|
36 |
raise error. |
|
|
36 | raise error.InputError(msg, hint=hint) | |
|
37 | 37 | |
|
38 | 38 | if len(repo[None].parents()) > 1: |
|
39 |
raise error. |
|
|
39 | raise error.StateError(_(b"cannot %s while merging") % action) | |
|
40 | 40 | |
|
41 | 41 | publicrevs = repo.revs(b'%ld and public()', revs) |
|
42 | 42 | if publicrevs: |
|
43 | 43 | msg = _(b"cannot %s public changesets") % action |
|
44 | 44 | hint = _(b"see 'hg help phases' for details") |
|
45 |
raise error. |
|
|
45 | raise error.InputError(msg, hint=hint) | |
|
46 | 46 | |
|
47 | 47 | newunstable = disallowednewunstable(repo, revs) |
|
48 | 48 | if newunstable: |
|
49 |
raise error. |
|
|
49 | raise error.InputError(_(b"cannot %s changeset with children") % action) | |
|
50 | 50 | |
|
51 | 51 | |
|
52 | 52 | def disallowednewunstable(repo, revs): |
@@ -197,7 +197,7 b' Amend in the middle of a stack' | |||
|
197 | 197 | $ echo 2 >> B |
|
198 | 198 | $ hg amend |
|
199 | 199 | abort: cannot amend changeset with children |
|
200 |
[ |
|
|
200 | [10] | |
|
201 | 201 | |
|
202 | 202 | #if obsstore-on |
|
203 | 203 | |
@@ -240,7 +240,7 b' Cannot amend public changeset' | |||
|
240 | 240 | $ hg amend -m AMEND |
|
241 | 241 | abort: cannot amend public changesets |
|
242 | 242 | (see 'hg help phases' for details) |
|
243 |
[ |
|
|
243 | [10] | |
|
244 | 244 | |
|
245 | 245 | Amend a merge changeset |
|
246 | 246 |
@@ -58,7 +58,7 b' Change in middle of the stack (linear co' | |||
|
58 | 58 | |
|
59 | 59 | $ hg branch -r 1::3 foo |
|
60 | 60 | abort: cannot change branch of changeset with children |
|
61 |
[ |
|
|
61 | [10] | |
|
62 | 62 | |
|
63 | 63 | Change with dirty working directory |
|
64 | 64 | |
@@ -129,7 +129,7 b' Changing on a branch head which is not t' | |||
|
129 | 129 | |
|
130 | 130 | $ hg branch -r 2 stable |
|
131 | 131 | abort: cannot change branch of changeset with children |
|
132 |
[ |
|
|
132 | [10] | |
|
133 | 133 | |
|
134 | 134 | Enabling the allowunstable config and trying to change branch on a branch head |
|
135 | 135 | which is not a topological head |
@@ -368,7 +368,7 b' Changing branch on public changeset' | |||
|
368 | 368 | $ hg branch -r . def |
|
369 | 369 | abort: cannot change branch of public changesets |
|
370 | 370 | (see 'hg help phases' for details) |
|
371 |
[ |
|
|
371 | [10] | |
|
372 | 372 | |
|
373 | 373 | Merge commit with conflicts, with evolution and without |
|
374 | 374 |
@@ -12,7 +12,7 b' Refuse to amend public csets:' | |||
|
12 | 12 | $ hg ci --amend |
|
13 | 13 | abort: cannot amend public changesets |
|
14 | 14 | (see 'hg help phases' for details) |
|
15 |
[ |
|
|
15 | [10] | |
|
16 | 16 | $ hg phase -r . -f -d |
|
17 | 17 | |
|
18 | 18 | $ echo a >> a |
@@ -407,7 +407,7 b' Refuse to amend during a merge:' | |||
|
407 | 407 | (branch merge, don't forget to commit) |
|
408 | 408 | $ hg ci --amend |
|
409 | 409 | abort: cannot amend while merging |
|
410 |
[2 |
|
|
410 | [20] | |
|
411 | 411 | $ hg ci -m 'merge' |
|
412 | 412 | |
|
413 | 413 | Refuse to amend if there is a merge conflict (issue5805): |
@@ -266,11 +266,11 b' nothing happens, even to the working dir' | |||
|
266 | 266 | $ hg fix -r 0 |
|
267 | 267 | abort: cannot fix public changesets |
|
268 | 268 | (see 'hg help phases' for details) |
|
269 |
[ |
|
|
269 | [10] | |
|
270 | 270 | $ hg fix -r 0 --working-dir |
|
271 | 271 | abort: cannot fix public changesets |
|
272 | 272 | (see 'hg help phases' for details) |
|
273 |
[ |
|
|
273 | [10] | |
|
274 | 274 | $ hg cat -r tip hello.whole |
|
275 | 275 | hello |
|
276 | 276 | $ cat hello.whole |
@@ -1174,7 +1174,7 b' an orphan. We must respect experimental.' | |||
|
1174 | 1174 | $ hg commit -m "second" |
|
1175 | 1175 | $ hg --config experimental.evolution.allowunstable=False fix -r '.^' |
|
1176 | 1176 | abort: cannot fix changeset with children |
|
1177 |
[ |
|
|
1177 | [10] | |
|
1178 | 1178 | $ hg fix -r '.^' |
|
1179 | 1179 | 1 new orphan changesets |
|
1180 | 1180 | $ hg cat -r 2 foo.whole |
@@ -309,7 +309,7 b' Check that histedit respect immutability' | |||
|
309 | 309 | $ hg histedit -r '.~2' |
|
310 | 310 | abort: cannot edit public changesets |
|
311 | 311 | (see 'hg help phases' for details) |
|
312 |
[ |
|
|
312 | [10] | |
|
313 | 313 | |
|
314 | 314 | |
|
315 | 315 | Prepare further testing |
@@ -551,7 +551,7 b' Test collapsing a middle revision in-pla' | |||
|
551 | 551 | $ hg rebase --collapse -r 1 -d 0 |
|
552 | 552 | abort: cannot rebase changeset with children |
|
553 | 553 | (use --keep to keep original changesets) |
|
554 |
[ |
|
|
554 | [10] | |
|
555 | 555 | |
|
556 | 556 | Test collapsing in place |
|
557 | 557 |
@@ -327,15 +327,15 b' Check rebasing public changeset' | |||
|
327 | 327 | $ hg rebase -d 0 -b 6 |
|
328 | 328 | abort: cannot rebase public changesets |
|
329 | 329 | (see 'hg help phases' for details) |
|
330 |
[ |
|
|
330 | [10] | |
|
331 | 331 | $ hg rebase -d 5 -b 6 |
|
332 | 332 | abort: cannot rebase public changesets |
|
333 | 333 | (see 'hg help phases' for details) |
|
334 |
[ |
|
|
334 | [10] | |
|
335 | 335 | $ hg rebase -d 5 -r '1 + (6::)' |
|
336 | 336 | abort: cannot rebase public changesets |
|
337 | 337 | (see 'hg help phases' for details) |
|
338 |
[ |
|
|
338 | [10] | |
|
339 | 339 | |
|
340 | 340 | $ hg rebase -d 5 -b 6 --keep |
|
341 | 341 | rebasing 6:e1c4361dd923 "C" |
@@ -455,7 +455,7 b' Source on have two descendant heads but ' | |||
|
455 | 455 | $ hg rebase -r '2::8' -d 1 |
|
456 | 456 | abort: cannot rebase changeset with children |
|
457 | 457 | (use --keep to keep original changesets) |
|
458 |
[ |
|
|
458 | [10] | |
|
459 | 459 | $ hg rebase -r '2::8' -d 1 -k |
|
460 | 460 | rebasing 2:c9e50f6cdc55 "C" |
|
461 | 461 | rebasing 3:ffd453c31098 "D" |
@@ -501,7 +501,7 b' Base on have one descendant heads we ask' | |||
|
501 | 501 | $ hg rebase -r '3::8' -d 1 |
|
502 | 502 | abort: cannot rebase changeset with children |
|
503 | 503 | (use --keep to keep original changesets) |
|
504 |
[ |
|
|
504 | [10] | |
|
505 | 505 | $ hg rebase -r '3::8' -d 1 --keep |
|
506 | 506 | rebasing 3:ffd453c31098 "D" |
|
507 | 507 | rebasing 6:3d8a618087a7 "G" |
@@ -544,7 +544,7 b' rebase subset' | |||
|
544 | 544 | $ hg rebase -r '3::7' -d 1 |
|
545 | 545 | abort: cannot rebase changeset with children |
|
546 | 546 | (use --keep to keep original changesets) |
|
547 |
[ |
|
|
547 | [10] | |
|
548 | 548 | $ hg rebase -r '3::7' -d 1 --keep |
|
549 | 549 | rebasing 3:ffd453c31098 "D" |
|
550 | 550 | rebasing 6:3d8a618087a7 "G" |
@@ -584,7 +584,7 b' rebase subset with multiple head' | |||
|
584 | 584 | $ hg rebase -r '3::(7+5)' -d 1 |
|
585 | 585 | abort: cannot rebase changeset with children |
|
586 | 586 | (use --keep to keep original changesets) |
|
587 |
[ |
|
|
587 | [10] | |
|
588 | 588 | $ hg rebase -r '3::(7+5)' -d 1 --keep |
|
589 | 589 | rebasing 3:ffd453c31098 "D" |
|
590 | 590 | rebasing 4:c01897464e7f "E" |
@@ -79,7 +79,7 b' Cannot split a public changeset' | |||
|
79 | 79 | $ hg split . |
|
80 | 80 | abort: cannot split public changesets |
|
81 | 81 | (see 'hg help phases' for details) |
|
82 |
[ |
|
|
82 | [10] | |
|
83 | 83 | |
|
84 | 84 | $ hg phase --draft -f -r 'all()' |
|
85 | 85 | |
@@ -467,7 +467,7 b' Split a non-head without rebase' | |||
|
467 | 467 | #if obsstore-off |
|
468 | 468 | $ runsplit -r 1 --no-rebase |
|
469 | 469 | abort: cannot split changeset with children |
|
470 |
[ |
|
|
470 | [10] | |
|
471 | 471 | #else |
|
472 | 472 | $ runsplit -r 1 --no-rebase >/dev/null |
|
473 | 473 | 3 new orphan changesets |
@@ -518,7 +518,7 b' Split a non-head with obsoleted descenda' | |||
|
518 | 518 | $ rm .hg/localtags |
|
519 | 519 | $ hg split $B --config experimental.evolution=createmarkers |
|
520 | 520 | abort: cannot split changeset with children |
|
521 |
[ |
|
|
521 | [10] | |
|
522 | 522 | $ cat > $TESTTMP/messages <<EOF |
|
523 | 523 | > Split B |
|
524 | 524 | > EOF |
@@ -284,7 +284,7 b' Unamending in middle of a stack' | |||
|
284 | 284 | |
|
285 | 285 | $ hg --config experimental.evolution=createmarkers unamend |
|
286 | 286 | abort: cannot unamend changeset with children |
|
287 |
[ |
|
|
287 | [10] | |
|
288 | 288 | |
|
289 | 289 | $ hg unamend |
|
290 | 290 | 3 new orphan changesets |
@@ -298,7 +298,7 b' Trying to unamend a public changeset' | |||
|
298 | 298 | $ hg unamend |
|
299 | 299 | abort: cannot unamend public changesets |
|
300 | 300 | (see 'hg help phases' for details) |
|
301 |
[ |
|
|
301 | [10] | |
|
302 | 302 | |
|
303 | 303 | Testing whether unamend retains copies or not |
|
304 | 304 |
@@ -53,7 +53,7 b' Uncommit with no commits should fail' | |||
|
53 | 53 | $ hg uncommit |
|
54 | 54 | abort: cannot uncommit null changeset |
|
55 | 55 | (no changeset checked out) |
|
56 |
[ |
|
|
56 | [10] | |
|
57 | 57 | |
|
58 | 58 | Create some commits |
|
59 | 59 | |
@@ -411,7 +411,7 b' Add and expect uncommit to fail on both ' | |||
|
411 | 411 | |
|
412 | 412 | $ hg uncommit --config experimental.uncommitondirtywdir=True |
|
413 | 413 | abort: cannot uncommit while merging |
|
414 |
[2 |
|
|
414 | [20] | |
|
415 | 415 | |
|
416 | 416 | $ hg status |
|
417 | 417 | M a |
General Comments 0
You need to be logged in to leave comments.
Login now