Mercurial > hg-stable
changeset 19695:6c52adcaba0e
commitablectx: move flags from workingctx
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 14 Aug 2013 16:25:43 -0500 |
parents | ba4c01c34df9 |
children | 210cc42a8ac2 |
files | mercurial/context.py |
diffstat | 1 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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,