Commit Graph

3 Commits

Author SHA1 Message Date
Arun Kulshreshtha
cdfe81c7d3 fbamend: change test for restack to use globs for rev numbers
Summary: One of the new features I'm adding to `hg previous` and `hg next` is replacing the rev numbers with commit hashes, since these are more familiar and intuitive to users. As a first step, update this test to glob out the rev numbers.

Test Plan: Test still passes.

Reviewers: durham, quark, #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

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

Tasks: 14119420

Signature: t1:4121748:1478162085:c7bc64f133dcfd7af67f349a10c0e0a587a8aa19
2016-11-03 11:11:37 -07:00
Arun Kulshreshtha
37cf7bd354 Make hg rebase --restack smarter
Differential Revision: https://phabricator.intern.facebook.com/D4000348
2016-10-14 11:05:53 -07:00
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