question on mq

Brendan Cully brendan at kublai.com
Tue Oct 7 22:09:31 UTC 2008


On Tuesday, 07 October 2008 at 17:00, Patrick Waugh wrote:
> Thanks, I got bold while waiting and found this out too.  =)
> 
> However, now I have another question.
> 
> I have created the "patch", but now I find that I cannot just "push"
> it to a remote repository.  So, if I don't want to hg qfinish (thus
> losing it as a patch), but want to apply it to a remote repository
> what is the best way to do this?
> 
> The only thing I could think of was to clone a local copy, and bundle
> it up, then unbundle the patch in the clone, and then qfinish it
> there, and then push that repository.
> 
> The reason I need to keep this as a patch, is I always want to
> completely remove it easily.
> 
> Ideas?

When I want to publish a repository with patches applied, I version
the patch queue and then use the following hooks in
<remote>/.hg/patches/.hg/hgrc:

[hooks]
changegroup.1update = hg update
changegroup.2pop = hg -R ../.. qpop -a
changegroup.3push = hg -R ../.. qpush -a

When I have refreshed the patch locally, I just mq commit and mq
push, and the remote repo gets updated too.



More information about the Mercurial mailing list