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