##// END OF EJS Templates
rewriteutil: say how many commits would become orphan if commit is rewritten...
Martin von Zweigbergk -
r47836:d90f6237 default
parent child Browse files
Show More
@@ -80,7 +80,9 b" def precheck(repo, revs, action=b'rewrit"
80 80 if newunstable:
81 81 hint = _(b"see 'hg help evolution.instability'")
82 82 raise error.InputError(
83 _(b"cannot %s changeset with children") % action, hint=hint
83 _(b"cannot %s changeset, as that will orphan %d descendants")
84 % (action, len(newunstable)),
85 hint=hint,
84 86 )
85 87
86 88 if not obsolete.isenabled(repo, obsolete.allowdivergenceopt):
@@ -196,7 +196,7 b' Amend in the middle of a stack'
196 196 $ hg update -q B
197 197 $ echo 2 >> B
198 198 $ hg amend
199 abort: cannot amend changeset with children
199 abort: cannot amend changeset, as that will orphan 1 descendants
200 200 (see 'hg help evolution.instability')
201 201 [10]
202 202
@@ -57,7 +57,7 b' Change on non-linear set of commits'
57 57 Change in middle of the stack (linear commits)
58 58
59 59 $ hg branch -r 1::3 foo
60 abort: cannot change branch of changeset with children
60 abort: cannot change branch of changeset, as that will orphan 1 descendants
61 61 (see 'hg help evolution.instability')
62 62 [10]
63 63
@@ -129,7 +129,7 b' Change branch name to an existing branch'
129 129 Changing on a branch head which is not topological head
130 130
131 131 $ hg branch -r 2 stable
132 abort: cannot change branch of changeset with children
132 abort: cannot change branch of changeset, as that will orphan 2 descendants
133 133 (see 'hg help evolution.instability')
134 134 [10]
135 135
@@ -1172,7 +1172,7 b' an orphan. We must respect experimental.'
1172 1172 $ printf "two\n" > foo.whole
1173 1173 $ hg commit -m "second"
1174 1174 $ hg --config experimental.evolution.allowunstable=False fix -r '.^'
1175 abort: cannot fix changeset with children
1175 abort: cannot fix changeset, as that will orphan 1 descendants
1176 1176 (see 'hg help evolution.instability')
1177 1177 [10]
1178 1178 $ hg fix -r '.^'
@@ -549,7 +549,7 b' Test collapsing a middle revision in-pla'
549 549 o 0: f447d5abf5ea 'add'
550 550
551 551 $ hg rebase --collapse -r 1 -d 0
552 abort: cannot rebase changeset with children
552 abort: cannot rebase changeset, as that will orphan 1 descendants
553 553 (see 'hg help evolution.instability')
554 554 [10]
555 555
@@ -452,7 +452,7 b' Source on have two descendant heads but '
452 452 $ hg clone -q -u . ah ah1
453 453 $ cd ah1
454 454 $ hg rebase -r '2::8' -d 1
455 abort: cannot rebase changeset with children
455 abort: cannot rebase changeset, as that will orphan 2 descendants
456 456 (see 'hg help evolution.instability')
457 457 [10]
458 458 $ hg rebase -r '2::8' -d 1 -k
@@ -498,7 +498,7 b' Base on have one descendant heads we ask'
498 498 $ hg clone -q -u . ah ah2
499 499 $ cd ah2
500 500 $ hg rebase -r '3::8' -d 1
501 abort: cannot rebase changeset with children
501 abort: cannot rebase changeset, as that will orphan 2 descendants
502 502 (see 'hg help evolution.instability')
503 503 [10]
504 504 $ hg rebase -r '3::8' -d 1 --keep
@@ -541,7 +541,7 b' rebase subset'
541 541 $ hg clone -q -u . ah ah3
542 542 $ cd ah3
543 543 $ hg rebase -r '3::7' -d 1
544 abort: cannot rebase changeset with children
544 abort: cannot rebase changeset, as that will orphan 3 descendants
545 545 (see 'hg help evolution.instability')
546 546 [10]
547 547 $ hg rebase -r '3::7' -d 1 --keep
@@ -581,7 +581,7 b' rebase subset with multiple head'
581 581 $ hg clone -q -u . ah ah4
582 582 $ cd ah4
583 583 $ hg rebase -r '3::(7+5)' -d 1
584 abort: cannot rebase changeset with children
584 abort: cannot rebase changeset, as that will orphan 1 descendants
585 585 (see 'hg help evolution.instability')
586 586 [10]
587 587 $ hg rebase -r '3::(7+5)' -d 1 --keep
@@ -466,7 +466,7 b' Split a non-head without rebase'
466 466 $ cd $TESTTMP/d
467 467 #if obsstore-off
468 468 $ runsplit -r 1 --no-rebase
469 abort: cannot split changeset with children
469 abort: cannot split changeset, as that will orphan 3 descendants
470 470 (see 'hg help evolution.instability')
471 471 [10]
472 472 #else
@@ -518,7 +518,7 b' Split a non-head with obsoleted descenda'
518 518 $ eval `hg tags -T '{tag}={node}\n'`
519 519 $ rm .hg/localtags
520 520 $ hg split $B --config experimental.evolution=createmarkers
521 abort: cannot split changeset with children
521 abort: cannot split changeset, as that will orphan 4 descendants
522 522 (see 'hg help evolution.instability')
523 523 [10]
524 524 $ cat > $TESTTMP/messages <<EOF
@@ -284,7 +284,7 b' Unamending in middle of a stack'
284 284
285 285
286 286 $ hg --config experimental.evolution=createmarkers unamend
287 abort: cannot unamend changeset with children
287 abort: cannot unamend changeset, as that will orphan 3 descendants
288 288 (see 'hg help evolution.instability')
289 289 [10]
290 290
General Comments 0
You need to be logged in to leave comments. Login now