Show More
@@ -260,6 +260,12 class narrowmatcher(match): | |||||
260 |
|
260 | |||
261 | self._files = [f[len(path) + 1:] for f in matcher._files |
|
261 | self._files = [f[len(path) + 1:] for f in matcher._files | |
262 | if f.startswith(path + "/")] |
|
262 | if f.startswith(path + "/")] | |
|
263 | ||||
|
264 | # If the parent repo had a path to this subrepo and no patterns are | |||
|
265 | # specified, this submatcher always matches. | |||
|
266 | if not self._always and not matcher._anypats: | |||
|
267 | self._always = util.any(f == path for f in matcher._files) | |||
|
268 | ||||
263 | self._anypats = matcher._anypats |
|
269 | self._anypats = matcher._anypats | |
264 | self.matchfn = lambda fn: matcher.matchfn(self._path + "/" + fn) |
|
270 | self.matchfn = lambda fn: matcher.matchfn(self._path + "/" + fn) | |
265 | self._fmap = set(self._files) |
|
271 | self._fmap = set(self._files) |
@@ -216,6 +216,19 Files sees uncommitted adds and removes | |||||
216 | sub1/sub2/missing: no such file in rev 78026e779ea6 (glob) |
|
216 | sub1/sub2/missing: no such file in rev 78026e779ea6 (glob) | |
217 | [1] |
|
217 | [1] | |
218 |
|
218 | |||
|
219 | $ hg files -S -r '.^' sub1/ | |||
|
220 | sub1/.hgsub (glob) | |||
|
221 | sub1/.hgsubstate (glob) | |||
|
222 | sub1/sub1 (glob) | |||
|
223 | sub1/sub2/folder/test.txt (glob) | |||
|
224 | sub1/sub2/sub2 (glob) | |||
|
225 | sub1/sub2/test.txt (glob) | |||
|
226 | ||||
|
227 | $ hg files -S -r '.^' sub1/sub2 | |||
|
228 | sub1/sub2/folder/test.txt (glob) | |||
|
229 | sub1/sub2/sub2 (glob) | |||
|
230 | sub1/sub2/test.txt (glob) | |||
|
231 | ||||
219 | $ hg rollback -q |
|
232 | $ hg rollback -q | |
220 | $ hg up -Cq |
|
233 | $ hg up -Cq | |
221 |
|
234 |
General Comments 0
You need to be logged in to leave comments.
Login now