mercurial/match.py
branchstable
changeset 25194 ef4538ba67ef
parent 24790 baa11dde8c0e
child 25195 472a685a4961
child 25636 bfe9ed85f27c
--- a/mercurial/match.py	Sun May 17 01:06:10 2015 -0400
+++ b/mercurial/match.py	Sun May 17 22:09:37 2015 -0400
@@ -260,6 +260,12 @@
 
         self._files = [f[len(path) + 1:] for f in matcher._files
                        if f.startswith(path + "/")]
+
+        # If the parent repo had a path to this subrepo and no patterns are
+        # specified, this submatcher always matches.
+        if not self._always and not matcher._anypats:
+            self._always = util.any(f == path for f in matcher._files)
+
         self._anypats = matcher._anypats
         self.matchfn = lambda fn: matcher.matchfn(self._path + "/" + fn)
         self._fmap = set(self._files)