[PATCH 2 of 2] mq: automatically upgrade to git patch when necessary (issue767)
Patrick Mézard
pmezard at gmail.com
Wed Dec 30 12:24:50 CST 2009
Le 30/12/09 18:48, Dirkjan Ochtman a écrit :
> On Wed, Dec 30, 2009 at 18:38, Patrick Mezard <pmezard at gmail.com> wrote:
>> # HG changeset patch
>> # User Patrick Mezard <pmezard at gmail.com>
>> # Date 1262194557 -3600
>> # Node ID 986e2d6e6eebc8acf5b07b9fb5298bcd2cef966e
>> # Parent 81c70639660b227332226cf2679e5c4f698fb486
>> mq: automatically upgrade to git patch when necessary (issue767)
>>
>> diff --git a/hgext/mq.py b/hgext/mq.py
>> --- a/hgext/mq.py
>> +++ b/hgext/mq.py
>> @@ -26,6 +26,18 @@
>> add known patch to applied stack qpush
>> remove patch from applied stack qpop
>> refresh contents of top applied patch qrefresh
>> +
>> +By default, mq will automatically use git patches when required to
>> +avoid losing changes to file modes, copy records or binary files. This
>> +behaviour can be configured with::
>> +
>> + [mq]
>> + git = auto/keep/yes/no
>> +
>> +If set to 'keep', mq will obey the [diff] section configuration while
>> +preserving existing git patches upon qrefresh. If set to 'yes' or
>> +'no', mq will override the [diff] section and always generate git or
>> +regular patches, possibly losing data in the second case.
>> '''
>
> It seems like a git = auto mode could make sense for non-mq parts
> (export, for instance), too, could we maybe move the option to reflect
> that?
I agree but at the same time I am not sure putting it directly in [diff] is a good idea, it could have too many side-effects on other commands. We need to think twice about this and I'd prefer to see this fix pushed even if it means extending this option afterwards. Anyway, I don't expect anybody but Matt to configure mq.git :-)
--
Patrick Mézard
More information about the Mercurial-devel
mailing list