mercurial/context.py
branchstable
changeset 44912 4234c9af515d
parent 44365 7c4b98a4e536
child 44916 61719b9658b1
--- a/mercurial/context.py	Sat May 16 20:38:19 2020 +0200
+++ b/mercurial/context.py	Sat May 16 20:38:31 2020 +0200
@@ -1458,6 +1458,18 @@
     def children(self):
         return []
 
+    def flags(self, path):
+        if '_manifest' in self.__dict__:
+            try:
+                return self._manifest.flags(path)
+            except KeyError:
+                return b''
+
+        try:
+            return self._flagfunc(path)
+        except OSError:
+            return b''
+
     def ancestor(self, c2):
         """return the "best" ancestor context of self and c2"""
         return self._parents[0].ancestor(c2)  # punt on two parents for now
@@ -1594,12 +1606,6 @@
         return self._repo.dirstate.flagfunc(self._buildflagfunc)
 
     def flags(self, path):
-        if '_manifest' in self.__dict__:
-            try:
-                return self._manifest.flags(path)
-            except KeyError:
-                return b''
-
         try:
             return self._flagfunc(path)
         except OSError: