diff 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
line wrap: on
line diff
--- 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)