move changes to branch retroactively?

Neal Becker ndbecker2 at gmail.com
Thu Jan 8 18:20:43 UTC 2015


Arne Babenhauserheide wrote:

> Am Donnerstag, 8. Januar 2015, 10:01:32 schrieb Matthew Turk:
>> What I would do is basically that -- someone else might have a better
>> suggestion, though.  I would update to where I want the new branch.  Create
>> it.  Commit.  Then, "hg rebase -d . -s 1116" which rebases onto current
>> revision, starting at revision 1116 and all its descendants.
> 
> I would use graft instead of rebase - that’s much easier to use.
> 
> hg update (revision to start the branch at)
> hg branch (branchname)
> hg graft 1116 1117
> 
> Best wishes,
> Arne
> --
> singing a part of the history of free software:
> 
> - http://infinite-hands.draketo.de


It's gotten a little more complicated.

Here's what I have:

1115 - 1116 - 1117 - 1118 - 1119
where 1119 is the new branch commit

1118 is a couple of changes I forgot to commit, but should be independent of 
other changes (1118 only changes files not touched by 1116+1117) 

So 1116+1117 are the changes I want to get off the default, and put on their own 
branch.

Here's what I want:

1115 - 1118 < default
     - 1119 - 1116 - 1117 < new branch

or even better:

1115 - 1118 < default
     - 1119 - 1116 - 1117 - 1118 < new branch

Now as I understand, graft _copies_ changes, not moves them, correct?





More information about the Mercurial mailing list