[PATCH 4 of 6] resolve: abort when not applicable
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu May 15 02:31:52 CDT 2014
On 05/09/2014 10:23 AM, Pierre-Yves David wrote:
> On 05/09/2014 02:54 AM, Mads Kiilerich wrote:
>> On 05/09/2014 03:46 AM, Gregory Szorc wrote:
[…]
>>> --- a/mercurial/merge.py
>>> +++ b/mercurial/merge.py
>>> @@ -175,8 +175,20 @@ class mergestate(object):
>>> if err.errno != errno.ENOENT:
>>> raise
>>> return records
>>> + def active(self):
>>> + """Whether mergestate is active.
>>> +
>>> + Returns True if there appears to be mergestate. This is a
>>> rough proxy
>>> + for "is a merge in progress."
>>> + """
>>> + # Check local variables before looking at filesystem for
>>> performance
>>> + # reasons.
>>> + return bool(self._local) or bool(self._state) or \
>>> + self._repo.opener.exists(self.statepathv1) or \
>>> + self._repo.opener.exists(self.statepathv2)
>>
>> Did you have a response to my question on
>> http://selenic.com/pipermail/mercurial-devel/2014-May/058585.html :
>>
>> Will there ever be a (relevant) case where _local doesn't give the full
>> answer? A mergestate without a _local (and _other) is no mergestate.
>>
>> It seems to me like this code is more complex than necessary.
>
> Woops, I missed the fact your started reviewing this series.
>
> This change is already crewed. so please choose one of
>
> 1. request unqueuing
> 2. request followup commit
So this changeset is now public. A followup commit would be nice.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list