[PATCH] match: added matchessubrepo method to matcher
Hannes Oldenburg
hannes.christian.oldenburg at gmail.com
Sat Aug 13 01:27:48 UTC 2016
Should i send a new patch that renames the method to matchessubpath or a
new version of the patch?
On Wed, Aug 10, 2016 at 12:52 PM, Pierre-Yves David <
pierre-yves.david at ens-lyon.org> wrote:
>
>
> On 08/10/2016 02:40 PM, Yuya Nishihara wrote:
>
>> On Tue, 09 Aug 2016 09:51:57 +0000, Hannes Oldenburg wrote:
>>
>>> # HG changeset patch
>>> # User Hannes Oldenburg <hannes.christian.oldenburg at gmail.com>
>>> # Date 1470733371 0
>>> # Tue Aug 09 09:02:51 2016 +0000
>>> # Node ID 83d4910236336c3a72cff356f9f002d0e0710efc
>>> # Parent 12c72545f8627845c56b070a27eff88adefd7c16
>>> match: added matchessubrepo method to matcher
>>>
>>
>> +++ b/mercurial/match.py Tue Aug 09 09:02:51 2016 +0000
>>> @@ -320,6 +320,10 @@
>>> kindpats.append((kind, pat, ''))
>>> return kindpats
>>>
>>> + def matchessubrepo(self, subpath):
>>> + return (self.exact(subpath)
>>> + or any(f.startswith(subpath + '/') for f in
>>> self.files()))
>>>
>>
>> This function isn't restricted to subrepos. Maybe it could be called by
>> more generic name such as m.anysubtreeof(f).
>>
>
> matchessubpath ?
>
> --
> Pierre-Yves David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160813/c77d8d10/attachment-0002.html>
More information about the Mercurial-devel
mailing list