diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -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: diff --git a/tests/test-merge-exec.t b/tests/test-merge-exec.t --- a/tests/test-merge-exec.t +++ b/tests/test-merge-exec.t @@ -209,6 +209,5 @@ a R a $ [ -x z ] || echo "executable bit lost" - executable bit lost $ cd ..