[PATCH 17 of 19] basectx: add _matchstatus method for factoring out last of parentworking logic
Sean Farley
sean.michael.farley at gmail.com
Fri May 16 01:12:04 UTC 2014
Pierre-Yves David <pierre-yves.david at ens-lyon.org> writes:
> On 05/15/2014 02:16 PM, Sean Farley wrote:
>> # HG changeset patch
>> # User Sean Farley <sean.michael.farley at gmail.com>
>> # Date 1398285570 18000
>> # Wed Apr 23 15:39:30 2014 -0500
>> # Node ID 0770226fad0f8961a755cb516c9e0604c7a4209a
>> # Parent 5e4e31f7dca07c7883f01e339e1365c882e5d213
>> basectx: add _matchstatus method for factoring out last of parentworking logic
>>
>> diff --git a/mercurial/context.py b/mercurial/context.py
>> --- a/mercurial/context.py
>> +++ b/mercurial/context.py
>> @@ -70,10 +70,15 @@ class basectx(object):
>> for fn in mf.keys():
>> if not match(fn):
>> del mf[fn]
>> return mf
>>
>> + def _matchstatus(self, other, s, match, listignored, listclean,
>> + listunknown):
>> + """return match.always if match is none -- internal use only"""
>
> should be:
>
> """return match.always if match is none
>
> internal use only"""
>
> Also the doc-string is completely opaque to me right now.
This is only to help get rid of the tiny method in localrepo.statu:
def mfmatches(ctx):
mf = ctx.manifest().copy()
if match.always():
return mf
for fn in mf.keys():
if not match(fn):
del mf[fn]
return mf
Do you have a better suggestion?
More information about the Mercurial-devel
mailing list