Comments
Patch
@@ -1016,10 +1016,22 @@
return False
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.
date - any valid date string or (unixtime, offset), or None.
user - username string, or None.
@@ -1042,22 +1054,10 @@
p = self._repo.dirstate.parents()
if p[1] == nullid:
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,
filelog=filelog)