mq updates pullable

Chris Mason mason at
Sun Sep 11 13:58:18 CDT 2005

Hello everyone,

You can pull mq rev v0.22 from:

Sorry this is a different location on, I'll go back to
using the other one once Bryan shows me how to push to it.

This release features an improved strip command, it is much faster when
you have to preserve unrelated branches.  This required reworking the
changegroup code somewhat, please use run hg verify often after push,
pull and strip commands.

I fixed a bug in hg qrefresh when the patch being refreshed creates a
new file.

Also, limited support for patch revision control now exists.  It has
always been possible to make .hg/patches a repository:

hg qinit
hg -R .hg/patches init

I've added a hg qsave and qrestore command, these help tie together the
main repository and the patch repository.  hg qsave pushes a copy of
the .hg/patches/series and .hg/patches/status file onto the top of the
stack in the main repository.  It also records the dirstate parents of
the patch working dir.  For example, consider the linux kernel tree,
and a patch repository with patches for v2.6.12 and a second head with
patches for v2.6.13:

hg update v2.6.12
hg -R .hg/patches update patches-2.6.12
<create series file>
hg qpush -a
hg qsave -m 'saved patch state for v2.6.12'
hg update -C v2.6.13
hg -R .hg/patches update -C patches-2.6.13
<create series file>
hg qpush -a
hg qsave -m 'saved patch state for v2.6.13'

hg heads will now show you heads for both the 2.6.12 patched tree and
2.6.13 patched tree.  Pick the head from the 2.6.12 patched kernel,
lets say it was revision 7012 in this example.

hg update -C 7012
# this will update just .hg/patches/{series,status}
hg qrestore 7012      

# this will use the saved dirstate parents to update the
whole .hg/patches dir hg qrestore -u 7012

# -d strips off the changeset created by the save
hg qrestore -d -u 7012

If you turn .hg/patches into a full repository, it is a good idea to
add the status file into .hg/patches/.hgignore.  The status file is
state that really belongs with the main repository, since it records
which patches are currently applied.  There's no reason the series file
can't be under revision control.  In the suse kernel tree the series
file is generated from a different file, so I copy it into the save
changeset along with the status file.

Note that hg clone and bundle will not normally include the .hg/patches
directory.  This only happens when you're doing a clone on the local
disk (where hardlinks are used).


More information about the Mercurial mailing list