diff mercurial/context.py @ 44916:61719b9658b1

merge with stable
author Yuya Nishihara <yuya@tcha.org>
date Wed, 03 Jun 2020 19:20:18 +0900
parents e607099d8b93 4234c9af515d
children b2e5ec0c596b
line wrap: on
line diff
--- a/mercurial/context.py	Sat May 30 12:36:00 2020 -0400
+++ b/mercurial/context.py	Wed Jun 03 19:20:18 2020 +0900
@@ -1465,6 +1465,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
@@ -1601,12 +1613,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: