mercurial/context.py
changeset 21895 5809d62e7106
parent 21880 e6754f5e4cf7
child 21938 c8411fb5dfef
--- a/mercurial/context.py	Sat Jul 12 00:37:08 2014 -0700
+++ b/mercurial/context.py	Wed Jul 16 14:53:03 2014 -0700
@@ -74,8 +74,10 @@
         if match.always():
             return self.manifest().copy()
 
-        if match.matchfn == match.exact:
-            return self.manifest().intersectfiles(match.files())
+        files = match.files()
+        if (match.matchfn == match.exact or
+            (not match.anypats() and util.all(fn in self for fn in files))):
+            return self.manifest().intersectfiles(files)
 
         mf = self.manifest().copy()
         for fn in mf.keys():