hg push with mq applied

Eric M. Hopper hopper at omnifarious.org
Fri May 25 18:30:11 UTC 2007


On Fri, 2007-05-25 at 07:31 -0700, Brendan Cully wrote:
> On Thursday, 24 May 2007 at 19:47, Bernd Schubert wrote:
> > Hi,
> > 
> > I'm adding patches to a project and I'm doing this on my local disk. In
> > order store this to save (backuped) storage I would like to push everything
> > to the backuped dir,  but this fails with 
> > 
> > abort: source has mq patches applied
> > 
> > Well I know that it has mq patches applied and I would like to push these
> > patches as well.
> > 
> > Any idea what I should do?
> 
> As others have pointed out, it's usually not a great idea to push mq
> patches to another repository. The reason they're under mq control is
> presumably that they will be popped and reapplied later. When this
> happens, your remote replica will end up with dangling heads from the
> older versions.
> 
> If you really want to force it, push -r will allow you to push with mq
> patches applied. But it's much better to version .hg/patches. You can
> set up a trivial hook to push .hg/patches when you push the main
> repository.

I think this isn't what he wants to do.  I think what he wants is for
push to push both the repo (if any) that contains the MQ patches and the
main repo at the same time.  I can quite understand this desire as I've
had it many times myself.

If you use hg qinit, it puts the mq patches under version control in
their own separate repository.  You can then use qcommit to commit
changes to that repo, which happen when you add a new patch or modify an
existing one with qrefresh.  It explicitly doesn't put the list of
currently applied patches under version control as that would just be
silly.

Have fun (if at all possible),
-- 
The best we can hope for concerning the people at large is that they
be properly armed.  -- Alexander Hamilton
-- Eric Hopper (hopper at omnifarious.org  http://www.omnifarious.org/~hopper) --
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 185 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20070525/e319436f/attachment-0001.asc>


More information about the Mercurial mailing list