2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2016-09-23 20:39:36 +03:00
|
|
|
Set up test environment.
|
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [extensions]
|
2018-10-11 16:55:19 +03:00
|
|
|
> amend=
|
2016-09-23 20:39:36 +03:00
|
|
|
> rebase=
|
|
|
|
> [experimental]
|
2019-09-02 13:12:07 +03:00
|
|
|
> evolution=
|
|
|
|
> [mutation]
|
|
|
|
> record=true
|
|
|
|
> enabled=true
|
|
|
|
> date=0 0
|
|
|
|
> [visibility]
|
|
|
|
> enabled=true
|
2016-09-23 20:39:36 +03:00
|
|
|
> EOF
|
|
|
|
$ mkcommit() {
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
> echo "$1" > "$1"
|
|
|
|
> hg add "$1"
|
|
|
|
> echo "add $1" > msg
|
|
|
|
> hg ci -l msg
|
|
|
|
> }
|
|
|
|
$ reset() {
|
|
|
|
> cd ..
|
|
|
|
> rm -rf nextrebase
|
|
|
|
> hg init nextrebase
|
|
|
|
> cd nextrebase
|
|
|
|
> }
|
|
|
|
$ showgraph() {
|
|
|
|
> hg log --graph -T "{rev} {desc|firstline}"
|
2016-09-23 20:39:36 +03:00
|
|
|
> }
|
|
|
|
$ hg init nextrebase && cd nextrebase
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
Cannot --rebase and --merge.
|
|
|
|
$ hg next --rebase --merge
|
|
|
|
abort: cannot use both --merge and --rebase
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
[255]
|
|
|
|
|
2019-03-22 13:35:53 +03:00
|
|
|
Build dag with instablility
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg debugbuilddag -n +4
|
|
|
|
$ hg up 1
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2017-12-28 09:54:03 +03:00
|
|
|
$ hg amend -m "amended" --no-rebase
|
2018-04-07 10:36:52 +03:00
|
|
|
hint[amend-restack]: descendants of e8ec16b776b6 are left behind - use 'hg restack' to rebase them
|
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
2019-03-22 13:35:53 +03:00
|
|
|
|
|
|
|
Check the next behaviour in case of ambiguity between obsolete and non-obsolete
|
|
|
|
$ showgraph
|
|
|
|
@ 4 amended
|
|
|
|
|
|
|
|
|
| o 3 r3
|
|
|
|
| |
|
|
|
|
| o 2 r2
|
|
|
|
| |
|
|
|
|
| x 1 r1
|
|
|
|
|/
|
|
|
|
o 0 r0
|
|
|
|
|
|
|
|
$ hg prev
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
[612462] r0
|
|
|
|
$ hg next
|
|
|
|
changeset 61246295ee1e has multiple children, namely:
|
|
|
|
[e8ec16] r1
|
2019-09-02 13:12:07 +03:00
|
|
|
[f03405] amended
|
|
|
|
choosing the only non-obsolete child: f03405deb52b
|
2019-03-22 13:35:53 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[f03405] amended
|
2019-03-22 13:35:53 +03:00
|
|
|
|
|
|
|
Rebasing single changeset.
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg next
|
|
|
|
abort: current changeset has no children
|
|
|
|
[255]
|
|
|
|
$ hg next --rebase
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 776c07fa2b12 "r2"
|
2016-11-16 05:46:56 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[8fb200] r2
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2016-11-16 05:46:56 +03:00
|
|
|
@ 5 r2
|
2016-09-23 20:39:36 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
o 4 amended
|
|
|
|
|
|
|
|
|
| o 3 r3
|
2016-09-23 20:39:36 +03:00
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 2 r2
|
2016-11-16 05:46:56 +03:00
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 1 r1
|
2016-09-23 20:39:36 +03:00
|
|
|
|/
|
2016-11-16 05:46:56 +03:00
|
|
|
o 0 r0
|
2016-09-23 20:39:36 +03:00
|
|
|
|
2017-07-19 06:13:25 +03:00
|
|
|
Test --clean flag.
|
|
|
|
$ touch foo
|
|
|
|
$ hg add foo
|
|
|
|
$ hg status
|
|
|
|
A foo
|
|
|
|
$ hg next --rebase
|
|
|
|
abort: uncommitted changes
|
|
|
|
(use --clean to discard uncommitted changes or --merge to bring them along)
|
|
|
|
[255]
|
|
|
|
$ hg next --rebase --clean
|
|
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 137d867d71d5 "r3"
|
2017-07-19 06:13:25 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[f12433] r3
|
2017-07-19 06:13:25 +03:00
|
|
|
$ hg status
|
|
|
|
? foo
|
|
|
|
$ showgraph
|
|
|
|
@ 6 r3
|
|
|
|
|
|
|
|
|
o 5 r2
|
|
|
|
|
|
|
|
|
o 4 amended
|
|
|
|
|
|
|
|
|
o 0 r0
|
|
|
|
|
2016-09-23 20:39:36 +03:00
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
Rebasing multiple changesets at once.
|
|
|
|
$ reset
|
|
|
|
$ hg debugbuilddag -n +5
|
|
|
|
$ hg up 1
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2017-12-28 09:54:03 +03:00
|
|
|
$ hg amend -m "amended" --no-rebase
|
2018-04-07 10:36:52 +03:00
|
|
|
hint[amend-restack]: descendants of e8ec16b776b6 are left behind - use 'hg restack' to rebase them
|
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg next --rebase --top
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 776c07fa2b12 "r2"
|
|
|
|
rebasing 137d867d71d5 "r3"
|
|
|
|
rebasing daa37004f338 "r4"
|
2016-11-16 05:46:56 +03:00
|
|
|
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[d25685] r4
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2016-11-16 05:46:56 +03:00
|
|
|
@ 8 r4
|
2016-09-23 20:39:36 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
o 7 r3
|
2016-09-23 20:39:36 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
o 6 r2
|
|
|
|
|
|
|
|
|
o 5 amended
|
|
|
|
|
|
|
|
|
o 0 r0
|
2016-09-23 20:39:36 +03:00
|
|
|
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
Rebasing a stack one changeset at a time.
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ reset
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg debugbuilddag -n +5
|
|
|
|
$ hg up 1
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2017-12-28 09:54:03 +03:00
|
|
|
$ hg amend -m "amended" --no-rebase
|
2018-04-07 10:36:52 +03:00
|
|
|
hint[amend-restack]: descendants of e8ec16b776b6 are left behind - use 'hg restack' to rebase them
|
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg next --rebase
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 776c07fa2b12 "r2"
|
2016-11-16 05:46:56 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[8fb200] r2
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg next --rebase
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 137d867d71d5 "r3"
|
2016-11-16 05:46:56 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[f12433] r3
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2016-11-16 05:46:56 +03:00
|
|
|
@ 7 r3
|
2016-09-23 20:39:36 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
o 6 r2
|
|
|
|
|
|
|
|
|
o 5 amended
|
|
|
|
|
|
|
|
|
| o 4 r4
|
2016-09-23 20:39:36 +03:00
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 3 r3
|
2016-11-16 05:46:56 +03:00
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 2 r2
|
2016-11-16 05:46:56 +03:00
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 1 r1
|
2016-09-23 20:39:36 +03:00
|
|
|
|/
|
2016-11-16 05:46:56 +03:00
|
|
|
o 0 r0
|
2016-09-23 20:39:36 +03:00
|
|
|
|
|
|
|
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ hg next --rebase
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing daa37004f338 "r4"
|
2016-11-16 05:46:56 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[d25685] r4
|
2016-11-16 05:46:56 +03:00
|
|
|
$ showgraph
|
|
|
|
@ 8 r4
|
|
|
|
|
|
|
|
|
o 7 r3
|
|
|
|
|
|
|
|
|
o 6 r2
|
|
|
|
|
|
|
|
|
o 5 amended
|
|
|
|
|
|
|
|
|
o 0 r0
|
|
|
|
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
Rebasing a stack two changesets at a time.
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ reset
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg debugbuilddag -n +6
|
|
|
|
$ hg up 1
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2017-12-28 09:54:03 +03:00
|
|
|
$ hg amend -m "amended" --no-rebase
|
2018-04-07 10:36:52 +03:00
|
|
|
hint[amend-restack]: descendants of e8ec16b776b6 are left behind - use 'hg restack' to rebase them
|
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg next --rebase 2
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 776c07fa2b12 "r2"
|
|
|
|
rebasing 137d867d71d5 "r3"
|
2016-11-16 05:46:56 +03:00
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[f12433] r3
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2016-11-16 05:46:56 +03:00
|
|
|
@ 8 r3
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
o 7 r2
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
o 6 amended
|
|
|
|
|
|
|
|
|
| o 5 r5
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
| |
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 4 r4
|
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 3 r3
|
2016-11-16 05:46:56 +03:00
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 2 r2
|
2016-11-16 05:46:56 +03:00
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 1 r1
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|/
|
2016-11-16 05:46:56 +03:00
|
|
|
o 0 r0
|
|
|
|
|
|
|
|
$ hg next --rebase 2
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing daa37004f338 "r4"
|
|
|
|
rebasing 5f333e6f7274 "r5"
|
2016-11-16 05:46:56 +03:00
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[dd153e] r5
|
2016-11-16 05:46:56 +03:00
|
|
|
$ showgraph
|
|
|
|
@ 10 r5
|
|
|
|
|
|
|
|
|
o 9 r4
|
|
|
|
|
|
|
|
|
o 8 r3
|
|
|
|
|
|
|
|
|
o 7 r2
|
|
|
|
|
|
|
|
|
o 6 amended
|
|
|
|
|
|
|
|
|
o 0 r0
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
Rebasing after multiple amends.
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ reset
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg debugbuilddag -n +5
|
|
|
|
$ hg up 1
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2017-12-28 09:54:03 +03:00
|
|
|
$ hg amend -m "amend 1" --no-rebase
|
2018-04-07 10:36:52 +03:00
|
|
|
hint[amend-restack]: descendants of e8ec16b776b6 are left behind - use 'hg restack' to rebase them
|
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg amend -m "amend 2"
|
|
|
|
$ hg amend -m "amend 3"
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2016-11-16 05:46:56 +03:00
|
|
|
@ 7 amend 3
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 4 r4
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
| |
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 3 r3
|
|
|
|
| |
|
|
|
|
| o 2 r2
|
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 1 r1
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|/
|
2016-11-16 05:46:56 +03:00
|
|
|
o 0 r0
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg next --rebase --top
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 776c07fa2b12 "r2"
|
|
|
|
rebasing 137d867d71d5 "r3"
|
|
|
|
rebasing daa37004f338 "r4"
|
2016-11-16 05:46:56 +03:00
|
|
|
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[5d31c6] r4
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2016-11-16 05:46:56 +03:00
|
|
|
@ 10 r4
|
2016-09-23 20:39:36 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
o 9 r3
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
o 8 r2
|
|
|
|
|
|
|
|
|
o 7 amend 3
|
|
|
|
|
|
|
|
|
o 0 r0
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
Rebasing from below the amended changeset with the --newest flag.
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ reset
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg debugbuilddag -n +6
|
|
|
|
$ hg up 2
|
|
|
|
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2017-12-28 09:54:03 +03:00
|
|
|
$ hg amend -m "amended" --no-rebase
|
2018-04-07 10:36:52 +03:00
|
|
|
hint[amend-restack]: descendants of 776c07fa2b12 are left behind - use 'hg restack' to rebase them
|
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg up 0
|
|
|
|
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2016-11-16 05:46:56 +03:00
|
|
|
o 6 amended
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 5 r5
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
| |
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 4 r4
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
| |
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 3 r3
|
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 2 r2
|
2016-09-23 20:39:36 +03:00
|
|
|
|/
|
2016-11-16 05:46:56 +03:00
|
|
|
o 1 r1
|
|
|
|
|
|
|
|
|
@ 0 r0
|
|
|
|
|
|
|
|
$ hg next --rebase --top --newest
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 137d867d71d5 "r3"
|
|
|
|
rebasing daa37004f338 "r4"
|
|
|
|
rebasing 5f333e6f7274 "r5"
|
2016-11-16 05:46:56 +03:00
|
|
|
5 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[2d8122] r5
|
2016-11-16 05:46:56 +03:00
|
|
|
$ showgraph
|
|
|
|
@ 9 r5
|
|
|
|
|
|
|
|
|
o 8 r4
|
|
|
|
|
|
|
|
|
o 7 r3
|
|
|
|
|
|
|
|
|
o 6 amended
|
|
|
|
|
|
|
|
|
o 1 r1
|
|
|
|
|
|
|
|
|
o 0 r0
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
Test aborting due to ambiguity caused by a rebase. The rebase should be
|
|
|
|
rolled back and the final state should be as it was before `hg next --rebase`.
|
|
|
|
$ reset
|
|
|
|
$ hg debugbuilddag -n +6
|
|
|
|
$ hg up 1
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2017-12-28 09:54:03 +03:00
|
|
|
$ hg amend -m "amended" --no-rebase
|
2018-04-07 10:36:52 +03:00
|
|
|
hint[amend-restack]: descendants of e8ec16b776b6 are left behind - use 'hg restack' to rebase them
|
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
2016-11-16 05:46:56 +03:00
|
|
|
$ mkcommit a
|
|
|
|
$ hg prev
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[f03405] amended
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2016-11-16 05:46:56 +03:00
|
|
|
o 7 add a
|
2016-09-23 20:39:36 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
@ 6 amended
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 5 r5
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
| |
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 4 r4
|
2016-09-23 20:39:36 +03:00
|
|
|
| |
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 3 r3
|
|
|
|
| |
|
|
|
|
| o 2 r2
|
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 1 r1
|
2016-09-23 20:39:36 +03:00
|
|
|
|/
|
2016-11-16 05:46:56 +03:00
|
|
|
o 0 r0
|
2016-09-23 20:39:36 +03:00
|
|
|
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ hg next --rebase
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 776c07fa2b12 "r2"
|
2019-09-02 13:12:07 +03:00
|
|
|
changeset f03405deb52b has multiple children, namely:
|
|
|
|
[c9239a] add a
|
|
|
|
[8fb200] r2
|
2016-11-16 05:46:56 +03:00
|
|
|
transaction abort!
|
|
|
|
rollback completed
|
|
|
|
abort: ambiguous next changeset
|
2017-03-12 20:09:12 +03:00
|
|
|
(use the --newest or --towards flags to specify which child to pick)
|
2016-11-16 05:46:56 +03:00
|
|
|
[255]
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2016-11-16 05:46:56 +03:00
|
|
|
o 7 add a
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
@ 6 amended
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 5 r5
|
|
|
|
| |
|
|
|
|
| o 4 r4
|
|
|
|
| |
|
|
|
|
| o 3 r3
|
|
|
|
| |
|
|
|
|
| o 2 r2
|
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 1 r1
|
2016-11-16 05:46:56 +03:00
|
|
|
|/
|
|
|
|
o 0 r0
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
Test a situation where there is a conflict.
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ reset
|
|
|
|
$ mkcommit a
|
|
|
|
$ mkcommit b
|
2016-11-16 05:46:56 +03:00
|
|
|
$ mkcommit c
|
|
|
|
$ mkcommit d
|
|
|
|
$ hg up 1
|
|
|
|
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
|
|
|
|
$ echo "conflict" > c
|
|
|
|
$ hg add c
|
2017-12-28 09:54:03 +03:00
|
|
|
$ hg amend -m "amended to add c" --no-rebase
|
2018-04-07 10:36:52 +03:00
|
|
|
hint[amend-restack]: descendants of 7c3bad9141dc are left behind - use 'hg restack' to rebase them
|
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2017-09-08 19:58:14 +03:00
|
|
|
@ 4 amended to add c
|
2016-09-23 20:39:36 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 3 add d
|
|
|
|
| |
|
|
|
|
| o 2 add c
|
2016-09-23 20:39:36 +03:00
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 1 add b
|
2016-09-23 20:39:36 +03:00
|
|
|
|/
|
|
|
|
o 0 add a
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
$ hg next --rebase --top
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 4538525df7e2 "add c"
|
2016-11-16 05:46:56 +03:00
|
|
|
merging c
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging c! (edit, then use 'hg resolve --mark')
|
2016-09-23 20:39:36 +03:00
|
|
|
unresolved conflicts (see hg resolve, then hg rebase --continue)
|
|
|
|
[1]
|
2016-11-16 05:46:56 +03:00
|
|
|
$ showgraph
|
2017-09-08 19:58:14 +03:00
|
|
|
@ 4 amended to add c
|
2016-11-16 05:46:56 +03:00
|
|
|
|
|
|
|
|
| o 3 add d
|
|
|
|
| |
|
|
|
|
| @ 2 add c
|
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 1 add b
|
2016-11-16 05:46:56 +03:00
|
|
|
|/
|
|
|
|
o 0 add a
|
|
|
|
|
|
|
|
In this mid-rebase state, we can't use `hg previous` or `hg next`:
|
|
|
|
$ hg previous
|
2016-09-23 20:39:36 +03:00
|
|
|
abort: rebase in progress
|
|
|
|
(use 'hg rebase --continue' or 'hg rebase --abort')
|
|
|
|
[255]
|
2016-11-16 05:46:56 +03:00
|
|
|
Now resolve the conflict and resume the rebase.
|
|
|
|
$ rm c
|
|
|
|
$ echo "resolved" > c
|
|
|
|
$ hg resolve --mark c
|
2016-09-23 20:39:36 +03:00
|
|
|
(no more unresolved files)
|
|
|
|
continue: hg rebase --continue
|
|
|
|
$ hg rebase --continue
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 4538525df7e2 "add c"
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
$ showgraph
|
2017-09-08 19:58:14 +03:00
|
|
|
o 5 add c
|
2016-09-23 20:39:36 +03:00
|
|
|
|
|
2017-09-08 19:58:14 +03:00
|
|
|
@ 4 amended to add c
|
Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:
- Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
- Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
- The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
- This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.
Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.
A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.
Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941922
Tasks: 13570554
Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 20:40:58 +03:00
|
|
|
|
|
2016-11-16 05:46:56 +03:00
|
|
|
| o 3 add d
|
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 2 add c
|
2016-09-23 20:39:36 +03:00
|
|
|
| |
|
2017-07-11 01:45:31 +03:00
|
|
|
| x 1 add b
|
2016-09-23 20:39:36 +03:00
|
|
|
|/
|
|
|
|
o 0 add a
|
|
|
|
|
2019-09-02 13:12:07 +03:00
|
|
|
Rebase when other predecessors are still visible
|
|
|
|
$ reset
|
|
|
|
$ hg debugbuilddag -n +4
|
|
|
|
$ hg up 1
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ hg amend -m "amended 1" --no-rebase
|
|
|
|
hint[amend-restack]: descendants of e8ec16b776b6 are left behind - use 'hg restack' to rebase them
|
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
|
|
|
$ hg next --rebase
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 776c07fa2b12 "r2"
|
2019-09-02 13:12:07 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[bd2075] r2
|
2019-09-02 13:12:07 +03:00
|
|
|
$ hg prev
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
2019-09-02 13:12:07 +03:00
|
|
|
[80573e] amended 1
|
2019-09-02 13:12:07 +03:00
|
|
|
$ hg amend -m "amended 2" --no-rebase
|
2019-09-02 13:12:07 +03:00
|
|
|
hint[amend-restack]: descendants of 80573e6618ae are left behind - use 'hg restack' to rebase them
|
2019-09-02 13:12:07 +03:00
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
|
|
|
$ showgraph
|
|
|
|
@ 6 amended 2
|
|
|
|
|
|
|
|
|
| o 5 r2
|
|
|
|
| |
|
|
|
|
| x 4 amended 1
|
|
|
|
|/
|
|
|
|
| o 3 r3
|
|
|
|
| |
|
|
|
|
| x 2 r2
|
|
|
|
| |
|
|
|
|
| x 1 r1
|
|
|
|
|/
|
|
|
|
o 0 r0
|
|
|
|
|
|
|
|
$ hg next --rebase
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing bd2075358087 "r2"
|
2019-09-02 13:12:07 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2019-09-13 05:58:56 +03:00
|
|
|
[88a893] r2
|
2019-09-02 13:12:07 +03:00
|
|
|
$ showgraph
|
2019-09-02 13:12:07 +03:00
|
|
|
@ 7 r2
|
2019-09-02 13:12:07 +03:00
|
|
|
|
|
|
|
|
o 6 amended 2
|
|
|
|
|
|
|
|
|
| o 3 r3
|
|
|
|
| |
|
|
|
|
| x 2 r2
|
|
|
|
| |
|
|
|
|
| x 1 r1
|
|
|
|
|/
|
|
|
|
o 0 r0
|
|
|
|
|