Mercurial > hg
comparison mercurial/match.py @ 25195:472a685a4961
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 19 May 2015 07:17:57 -0500 |
parents | 1c8c33eaea0a ef4538ba67ef |
children | 08a8e9da0ae7 |
comparison
equal
deleted
inserted
replaced
25191:08d1ef09ed37 | 25195:472a685a4961 |
---|---|
272 self._always = matcher._always | 272 self._always = matcher._always |
273 self._pathrestricted = matcher._pathrestricted | 273 self._pathrestricted = matcher._pathrestricted |
274 | 274 |
275 self._files = [f[len(path) + 1:] for f in matcher._files | 275 self._files = [f[len(path) + 1:] for f in matcher._files |
276 if f.startswith(path + "/")] | 276 if f.startswith(path + "/")] |
277 | |
278 # If the parent repo had a path to this subrepo and no patterns are | |
279 # specified, this submatcher always matches. | |
280 if not self._always and not matcher._anypats: | |
281 self._always = any(f == path for f in matcher._files) | |
282 | |
277 self._anypats = matcher._anypats | 283 self._anypats = matcher._anypats |
278 self.matchfn = lambda fn: matcher.matchfn(self._path + "/" + fn) | 284 self.matchfn = lambda fn: matcher.matchfn(self._path + "/" + fn) |
279 self._fileroots = set(self._files) | 285 self._fileroots = set(self._files) |
280 | 286 |
281 def abs(self, f): | 287 def abs(self, f): |