sapling/hgext3rd
Arun Kulshreshtha a154bbaeb0 Add hg rebase --restack
Summary:
This change adds a `--restack` option to `hg rebase`. When invoked, the command will rebase all descendants of precursors of the current changeset onto the current changeset. This is similar to the behavior of `hg evolve --all`, except it only handles unstable changesets, and not other issues that can arise from shared mutable history such as divergence or bumping.

I've been playing around with some of the more advanced features (such as allowing the command to be run from anywhere in the old stack or new stack, as well as allowing the user to specify the number of changesets to rebase), but I wanted to upload the most simple iteration of this command for feedback.

Test Plan:
See unit tests for complete commands.

1. Create a stack of commits.
2. Somewhere in the middle of the stack, amend a commit, potentially several times.
3. Run `hg rebase --restack`.
4. The top half of the stack should be rebased onto the amended commit, and the preamend bookmark should be gone.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: rmcelroy, quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3972103

Tasks: 13651947

Signature: t1:3972103:1476230834:8f77eac4e8d8681dd9f8125747c1ff75c8da1ad8
2016-10-11 17:41:07 -07:00
..
__init__.py Fix hgext3rd/__init__.py to make sure it is a namespace package 2016-08-22 17:39:02 -07:00
absorb.py absorb: improve rename handling 2016-09-28 23:56:43 +01:00
arcdiff.py doc: replace "commit" where it is used as a noun with "changeset" 2016-09-21 15:45:25 +01:00
backups.py doc: replace "commit" where it is used as a noun with "changeset" 2016-09-21 15:45:25 +01:00
bundle2hooks.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
catnotate.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
chistedit.py doc: replace "commit" where it is used as a noun with "changeset" 2016-09-21 15:45:25 +01:00
commitextras.py doc: replace "commit" where it is used as a noun with "changeset" 2016-09-21 15:45:25 +01:00
debugcommitmessage.py extension to print commit message that would be supplied to editor 2016-10-03 04:39:51 -07:00
dialect.py dialect: new extension to "translate" messages to a dialect 2016-09-21 15:04:42 +01:00
dirsync.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
errorredirect.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
extorder.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
extutil.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
fastlog.py check-code fixes 2016-08-25 09:04:43 -07:00
fbamend.py Add hg rebase --restack 2016-10-11 17:41:07 -07:00
fbconduit.py Parallel callout to scmquery through conduit 2016-08-12 15:52:50 -07:00
fbhistedit.py doc: replace "commit" where it is used as a noun with "changeset" 2016-09-21 15:45:25 +01:00
githelp.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
gitlookup.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
gitrevset.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
grepdiff.py doc: replace "commit" where it is used as a noun with "changeset" 2016-09-21 15:45:25 +01:00
grpcheck.py grpcheck: new extension to check if the user is in given groups 2016-09-20 23:15:09 +01:00
inhibitwarn.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
logginghelper.py logginghelper: return repo name instead of repo root 2016-09-09 08:07:56 -07:00
mergedriver.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
morestatus.py doc: replace "commit" where it is used as a noun with "changeset" 2016-09-21 15:45:25 +01:00
nointerrupt.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
ownercheck.py ownercheck: new extension to prevent operations on repos not owned 2016-07-26 13:10:15 +01:00
patchpython.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
perftweaks.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
phabdiff.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
phabstatus.py doc: replace "commit" where it is used as a noun with "changeset" 2016-09-21 15:45:25 +01:00
phrevset.py [phrevset] fix "invalid literal for int()" error 2016-10-11 11:13:58 -07:00
profiling.py Log interactive time, internal command timing to scuba 2016-09-30 12:32:21 -07:00
pullcreatemarkers.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
pushrebase.py pushrebase: cleanup 2016-09-26 01:48:13 -07:00
pushvars.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
rage.py rage: use hg sl instead of smartlog to get better template 2016-09-29 11:19:52 -07:00
reset.py doc: replace "commit" where it is used as a noun with "changeset" 2016-09-21 15:45:25 +01:00
sampling.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
show.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
simplecache.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
smartlog.py smartlog: remove unused edge when indentnonpublic is set 2016-09-17 02:22:36 +01:00
sparse.py doc: replace "commit" where it is used as a noun with "changeset" 2016-09-21 15:45:25 +01:00
sshaskpass.py sshaskpass: disable echo for Password: prompt 2016-09-09 17:24:23 +01:00
statprofext.py Fix statprof for upstream 2016-08-29 15:23:04 -07:00
tweakdefaults.py Add hg rebase --restack 2016-10-11 17:41:07 -07:00
uncommit.py Implement 'hg uncommit' 2016-08-17 13:43:25 -07:00
upgradegeneraldelta.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00