why abort on grafting sibling?

Pierre-Yves David pierre-yves.david at logilab.fr
Wed Sep 26 08:56:37 UTC 2012


On Tue, Sep 25, 2012 at 08:02:04PM +0200, Robert Figura wrote:
> 
> hi,
> 
> in the middle of some history ...a-b-c...
> i'd like to tinker with a changeset b.
> so i'd like to duplicate it to qimport and edit it:
> 
> $ hg up -r a
> $ hg graft b
> grafting revision b
> abort: nothing to merge
> (use 'hg update' or check 'hg heads')
> 
> Aha, graft won't allow me to duplicate b.
> Using export | import directly gives the same problem.
> 
> I was reasoning that i maybe was trying something stupid and i found
> that there are other cases where it indeed is stupid to duplicate. So i
> really appreciate the warning.
> 
> Well, okay it is going to be a duplicate and that might be confusing.
> I could use qimport on all revs up to tip, edit and and qfinish instead.
> But i consider it a feature to have the original changesets around in
> place in case i screw up.

for this purpose you could:

$ hg up B
... hack the change you intend to B
$ hg commit -m 'minor changes to B'
$ hg rebase --keep --collapse --rev B::<you new change> --dest A

-- 
Pierre-Yves David

http://www.logilab.fr/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20120926/3a1b1445/attachment.asc>


More information about the Mercurial mailing list