mercurial/match.py
changeset 25195 472a685a4961
parent 25189 1c8c33eaea0a
parent 25194 ef4538ba67ef
child 25213 08a8e9da0ae7
--- a/mercurial/match.py	Fri Apr 24 14:30:30 2015 -0700
+++ b/mercurial/match.py	Tue May 19 07:17:57 2015 -0500
@@ -274,6 +274,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 = any(f == path for f in matcher._files)
+
         self._anypats = matcher._anypats
         self.matchfn = lambda fn: matcher.matchfn(self._path + "/" + fn)
         self._fileroots = set(self._files)