mercurial/scmutil.py
changeset 40423 597bb5a6867f
parent 40403 bf249bb60087
child 40424 7caf632e30c3
--- a/mercurial/scmutil.py	Thu Oct 18 19:57:30 2018 -0700
+++ b/mercurial/scmutil.py	Sat Oct 20 19:13:05 2018 +0900
@@ -1292,9 +1292,10 @@
         if obj is None:
             return self
         # do we need to check if the file changed?
-        if self.sname in obj.__dict__:
-            assert self.name in obj._filecache, self.name
+        try:
             return obj.__dict__[self.sname]
+        except KeyError:
+            pass
 
         entry = obj._filecache.get(self.name)