Messages in patches
Insitu
abailly at oqube.com
Sat Aug 4 02:10:26 CDT 2007
Giorgos Keramidas <keramida at ceid.upatras.gr> writes:
>
> It may be useful to note here that MQ can 'version' the patch sets, and
> 'qcommit' can be used to keep a change log of the patch queue itself.
>
> You can convert the patch queue to a 'patch repository' with:
>
> hg qinit -c
>
> Then the .hg/patches/ directory is a Mercurial repository too, and you
> can alternate between:
>
> hg qrefresh -e
> hg qcommit
>
> This will let you keep your patch queue versioned too, and you will be
> able to track the changes to your patches as they evolve over time.
>
> I often use MQ to keep a stack of patches on top of a snapshot of the
> 'official' source tree at work, and using 'qinit -c' with 'qcommit' lets
> me develop the patches themselves in small steps. This is very useful
> some times, i.e. when I qrefresh at the wrong moment it's marvellously
> easy to roll back bogus patch changes by popping the stack of patches
> and running:
>
> hg qpop -a
> ( cd .hg/patches ; rm -f * ; hg up -C )
> hg qpush -a
>
> This restores the patch queue to a 'known good state', the state of the
> last 'hg qcommit' operation, and I can keep massaging the patches until
> they have the precise shape and contents I want them to have.
>
> Maybe something like this, based on 'qinit -c' and 'qcommit' can help
> you track the state of your patches too :-)
>
That's really nice. I have read the mercurial book but not precisely
enough this part so I found patches versionning confusing. But your
explanation is enlightening. I will do that :-)
Thanks,
--
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com
More information about the Mercurial
mailing list