A question about using mq

Chris Mason mason at suse.com
Tue Nov 8 13:43:04 UTC 2005


On Mon, Nov 07, 2005 at 11:55:45PM -0800, Seth Falcon wrote:
> Hi all,
> 
> I'd like to hear from folks using mq.
> 
> I recently started using quilt to help me manage some patches for a
> project where I don't have commit rights to the (svn) repository.  I'm
> really liking quilt, but it was a royal pain to get working on OS X,
> and they don't seem very interested in improving things.  I've been
> using hg some and liking it and would much prefer a nicely portable
> Python-based solution :-)
> 
> I understand that mq requires an hg repository, but what isn't clear
> to me is whether I can use mq in the same way that I use quilt (inside
> an svn working copy of the upstream project) or not.
> 
> Comments?  Suggestions?

You can use mq in place of quilt, but you will have to duplicate your
svn repo into hg.  Some set of commands like this:

svn checkout
hg init
hg addremove
hg commit
mq init
< do things with patches >

Later on, you'll eventually want to run svn update.  Here you have a few
choices.  You can just do:

svn update
hg addremove
hg commit

But that will fold all the commits from svn into one commit in hg.  You
can use tailor to mirror the svn rep into hg, which will give you all
the svn commits as hg commit.

Another option if you just want the same features that quilt gives you
(no svn history at all as hg commits):

mkdir ../patches
svn checkout
hg init
hg addremove
hg commit
ln -s ../patches .hg/patches
< do things with patches >
# delete the hg rep so we can update history
rm -rf .hg
svn update

# now recreate the hg rep
hg init
hg addremove
hg commit
ln -s ../patches .hg/patches

-chris




More information about the Mercurial mailing list