mercurial/context.py
changeset 25195 472a685a4961
parent 25122 755d23a49170
parent 25193 ccb1623266eb
child 25303 b7876b8fa063
--- a/mercurial/context.py	Fri Apr 24 14:30:30 2015 -0700
+++ b/mercurial/context.py	Tue May 19 07:17:57 2015 -0500
@@ -9,7 +9,7 @@
 from i18n import _
 import mdiff, error, util, scmutil, subrepo, patch, encoding, phases
 import match as matchmod
-import os, errno, stat
+import copy, os, errno, stat
 import obsolete as obsmod
 import repoview
 import fileset
@@ -592,8 +592,14 @@
         '''Generates matching file names.'''
 
         # Override match.bad method to have message with nodeid
+        match = copy.copy(match)
         oldbad = match.bad
         def bad(fn, msg):
+            # The manifest doesn't know about subrepos, so don't complain about
+            # paths into valid subrepos.
+            if any(fn == s or fn.startswith(s + '/')
+                   for s in self.substate):
+                return
             oldbad(fn, _('no such file in rev %s') % self)
         match.bad = bad