Mercurial newbie question - how would I acheive this workflow in Mercurial?
Alpár Jüttner
alpar at cs.elte.hu
Thu Jun 5 17:40:55 CDT 2008
On Thu, 2008-06-05 at 22:22 +0100, Paul Moore wrote:
> 2008/6/5 Paul Chiusano <paul.chiusano at gmail.com>:
> > Hi,
> >
> > I am a former darcs user and would like to know what the idiomatic mercurial
> > way would be for handling the following workflow:
>
> This is usually referred to as "cherrypicking" (I don't know if that's
> common terminology for darcs), and you should be able to do this using
> the transplant extension. (You can find more in the wiki, but I can't
> get to it right now to include a reference, sorry).
The transplant extension is probably not something Paul is looking for
as it creates a _new_ changeset containing the same changes but on the
top of another parents. Therefore you cannot merge it back later. (In
fact, I find the transplant extension generally very useless because of
this.)
In Mercurial, the thing that is the closest to the darcs' approach is
probably using Mercurial Queue (mq).
You can import a series of changesets into mq, then you can edit the
sequence of them.
For example if your changeset ids are 34, 35, 36, 37 and 38, then
hg qinit
hg qimport -r 34:38
hg qpop -a
#edit .hg/patches/series for reordering the patches
hg qpush -a
hg qdel -r qbase:qtip
will do what you want.
Best regards,
Alpar
More information about the Mercurial
mailing list