patch queues and having a patch own a file

Tod Olson tod at uchicago.edu
Mon Aug 15 19:32:15 UTC 2011


On Aug 15, 2011, at 11:54 AM, L. David Baron wrote:

> On Monday 2011-08-15 10:31 -0500, Tod Olson wrote:
>> I'm using patch queues on a project, and am trying to figure out
>> how to have a patch own a file.  The goal would be that a qpush of
>> the patch cause the file to be created, and a qpop of the patch
>> would remove the file.
>> 
>> For example: I've added a config file to someone else's code.  It
>> seemed like "hg add" was the only way to get the patch queue to be
>> aware of the new file, but now every time I run "hg qpop -a", the
>> config file must be removed manually or reapplying the patches
>> will fail.
> 
> If you're running an older version of Mercurial, you may need to
> add:
> 
> [diff]
> git = 1
> 
> in your ~/.hgrc (which probably isn't a bad idea anyway).
> 
> It used to be that using mq without this setting was madness, though
> mq has gotten smarter since then (and I don't recall exactly when).

Yes, that could be part of it.  I'm using hg 1.6.2, and may not have set git=1 immediately.  I'll have to figure out how to recover.

-Tod




More information about the Mercurial mailing list