[PATCH] mq: --keep default behaviour of qdelete

Martin Geisler mg at aragost.com
Thu Oct 14 11:02:37 UTC 2010


Dirkjan Ochtman <dirkjan at ochtman.nl> writes:

> On Thu, Oct 14, 2010 at 11:45, Erik Zielke <ez at aragost.com> wrote:
>> # HG changeset patch
>> # User Erik Zielke <ez at aragost.com>
>> # Date 1286288142 -7200
>> # Node ID 2088b605790bfbeb7e99b37b3de6baa59d8d5e2e
>> # Parent  80a3d1121c106fd972fa84423f55b2ce2e9407c9
>> mq: --keep default behaviour of qdelete.
>>
>> Changed qdelete so that keep is default behaviour, and renames the
>> patch by appending .deleted to the patch file name.
>>
>> If a .deleted patch files of that name already exists, it will be
>> deleted, and the new deleted patch will be renamed to that name.
>
> Hmm, I don't really like it.
>
> One the one hand, this helps people prevent losing their stuff (if
> they invoke qdelete in a moment of insanity).

Right -- we had such a moment just recently:

  http://mercurial.markmail.org/thread/3eafvkhwxkfi5ypf

> On the other hand, it's unbounded growth of the patches dir, which
> seems pretty ugly. For people who want this, versioned MQs seem like
> the way to go (and perhaps we should have a mode where each qref,
> qnew, qdel and qfin gets qcommitted automatically).

I see this as a safety net in the same way that 'hg revert' has a safety
net when it creates a .orig file. I've never used the --no-backup flag
revert has, I just add *.orig to my .hgignore files.

You are of course right that the patches dir will grow and grow until
the user executes

  $ rm .hg/patches/*.deleted

However since most patches are small, I'm not so conserned with that.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/



More information about the Mercurial-devel mailing list