##// END OF EJS Templates
commitablectx: move flags from workingctx
Sean Farley -
r19695:6c52adca default
parent child Browse files
Show More
@@ -1018,6 +1018,18 b' class commitablectx(basectx):'
1018 def children(self):
1018 def children(self):
1019 return []
1019 return []
1020
1020
1021 def flags(self, path):
1022 if '_manifest' in self.__dict__:
1023 try:
1024 return self._manifest.flags(path)
1025 except KeyError:
1026 return ''
1027
1028 try:
1029 return self._flagfunc(path)
1030 except OSError:
1031 return ''
1032
1021 class workingctx(commitablectx):
1033 class workingctx(commitablectx):
1022 """A workingctx object makes access to data related to
1034 """A workingctx object makes access to data related to
1023 the current working directory convenient.
1035 the current working directory convenient.
@@ -1044,18 +1056,6 b' class workingctx(commitablectx):'
1044 p = p[:-1]
1056 p = p[:-1]
1045 return [changectx(self._repo, x) for x in p]
1057 return [changectx(self._repo, x) for x in p]
1046
1058
1047 def flags(self, path):
1048 if '_manifest' in self.__dict__:
1049 try:
1050 return self._manifest.flags(path)
1051 except KeyError:
1052 return ''
1053
1054 try:
1055 return self._flagfunc(path)
1056 except OSError:
1057 return ''
1058
1059 def filectx(self, path, filelog=None):
1059 def filectx(self, path, filelog=None):
1060 """get a file context from the working directory"""
1060 """get a file context from the working directory"""
1061 return workingfilectx(self._repo, path, workingctx=self,
1061 return workingfilectx(self._repo, path, workingctx=self,
General Comments 0
You need to be logged in to leave comments. Login now