diff -r ccb1623266eb -r ef4538ba67ef mercurial/match.py --- 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)