patch queues and having a patch own a file

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


On Aug 15, 2011, at 11:30 AM, Mads Kiilerich wrote:

> On 08/15/2011 05:31 PM, 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.
> 
> Did you do a 'hg qrefresh' so the add was picked up by mq?

Yes.  Actually, 'hg qpop' and the other commands that manipulate the queue are quite nice in that they will remind you to qrefresh if there are outstanding changes.

> (You need to know how mq works in order to use it efficiently. qrefresh 
> is basically a commit with some extra paperwork and brain surgery.)

Yes, I *think* I've got the basics.  That is, when I'm just working with existing files, everything works as I expect.  Just hitting this annoyance when adding files that are not part of the base code, and am wondering how others deal with new files.

> See also 
> http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html

Aha, that looks like it might be some info that I've not yet pieced together.

Thanks.

-Tod




More information about the Mercurial mailing list