# HG changeset patch # User Sean Farley # Date 1376515543 18000 # Node ID 6c52adcaba0ed14d510c9d44f255ea5daf07fa7a # Parent ba4c01c34df90242d50c5feb9678382e18211a06 commitablectx: move flags from workingctx diff -r ba4c01c34df9 -r 6c52adcaba0e mercurial/context.py --- a/mercurial/context.py Wed Aug 14 16:25:26 2013 -0500 +++ b/mercurial/context.py Wed Aug 14 16:25:43 2013 -0500 @@ -1018,6 +1018,18 @@ def children(self): return [] + def flags(self, path): + if '_manifest' in self.__dict__: + try: + return self._manifest.flags(path) + except KeyError: + return '' + + try: + return self._flagfunc(path) + except OSError: + return '' + class workingctx(commitablectx): """A workingctx object makes access to data related to the current working directory convenient. @@ -1044,18 +1056,6 @@ p = p[:-1] return [changectx(self._repo, x) for x in p] - def flags(self, path): - if '_manifest' in self.__dict__: - try: - return self._manifest.flags(path) - except KeyError: - return '' - - try: - return self._flagfunc(path) - except OSError: - return '' - def filectx(self, path, filelog=None): """get a file context from the working directory""" return workingfilectx(self._repo, path, workingctx=self,