Comments
Patch
@@ -111,10 +111,16 @@
return node, flag
def filenode(self, path):
return self._fileinfo(path)[0]
+ def flags(self, path):
+ try:
+ return self._fileinfo(path)[1]
+ except error.LookupError:
+ return ''
+
class changectx(context):
"""A changecontext object makes access to data related to a particular
changeset convenient. It represents a read-only context already presnt in
the repo."""
def __init__(self, repo, changeid=''):
@@ -332,16 +338,10 @@
troubles.append('bumped')
if self.divergent():
troubles.append('divergent')
return troubles
- def flags(self, path):
- try:
- return self._fileinfo(path)[1]
- except error.LookupError:
- return ''
-
def filectx(self, path, fileid=None, filelog=None):
"""get a file context from this changeset"""
if fileid is None:
fileid = self.filenode(path)
return filectx(self._repo, path, fileid=fileid,