Search Results

Search found 2 results on 1 pages for 'jpswain09'.

Page 1/1 | 1 

  • Hg: How to do a rebase like git's rebase

    - by jpswain09
    Hey guys, In Git I can do this: 1. Start working on new feature: $ git co -b newfeature-123 # (a local feature development branch) do a few commits (M, N, O) master A---B---C \ newfeature-123 M---N---O 2. Pull new changes from upstream master: $ git pull (master updated with ff-commits) master A---B---C---D---E---F \ newfeature-123 M---N---O 3. Rebase off master so that my new feature can be developed against the latest upstream changes: (from newfeature-123) $ git rebase master master A---B---C---D---E---F \ newfeature-123 M---N---O I want to know how to do the same thing in Mercurial, and I've scoured the web for an answer, but the best I could find was this: http://www.selenic.com/pipermail/mercurial/2007-June/013393.html That link provides 2 examples: 1. I'll admit that this: (replacing the revisions from the example with those from my own example) hg up -C F hg branch -f newfeature-123 hg transplant -a -b newfeature-123 is not too bad, except that it leaves behind the pre-rebase M-N-O as an unmerged head and creates 3 new commits M',N',O' that represent them branching off the updated mainline. Basically the problem is that I end up with this: master A---B---C---D---E---F \ \ newfeature-123 \ M'---N'---O' \ newfeature-123 M---N---O this is not good because it leaves behind local, unwanted commits that should be dropped. The other option from the same link is hg qimport -r M:O hg qpop -a hg up F hg branch newfeature-123 hg qpush -a hg qdel -r qbase:qtip and this does result in the desired graph: master A---B---C---D---E---F \ newfeature-123 M---N---O but these commands (all 6 of them!) seem so much more complicated than $ git rebase master I want to know if this is the only equivalent in Hg or if there is some other way available that is simple like Git. Thanks!! Jamie

    Read the article

  • Move a sequential set of commits from one (local) branch to another

    - by jpswain09
    Is there a way to move a sequential set of commits from one (local) branch to another? I have searched quite a bit and still haven't found a clear answer for what I want to do. For example, say I have this: master A---B---C \ feature-1 M---N---O---P---R---Q And I have decided that the last 3 commits would be better off like this: master A---B---C \ feature-1 M---N---O \ f1-crazy-idea P---R---Q I know I can do this, and it does work: $ git log --graph --pretty=oneline (copying down sha-1 ID's of P, R, Q) $ git checkout feature-1 $ git reset --hard HEAD^^^ $ git checkout -b f1-crazy-idea $ git cherry-pick <P sha1> $ git cherry-pick <R sha1> $ git cherry-pick <Q sha1> I was hoping that instead there would be a more concise way to do this, possibly with git rebase, although I haven't had much luck. Any insight would be greatly appreciated. Thanks, Jamie

    Read the article

1