##// END OF EJS Templates
filectx: make renamed a property cache...
Jun Wu -
r32235:c38c15d4 default
parent child Browse files
Show More
@@ -797,6 +797,8 b' class basefilectx(object):'
797 return self._changectx.manifest()
797 return self._changectx.manifest()
798 def changectx(self):
798 def changectx(self):
799 return self._changectx
799 return self._changectx
800 def renamed(self):
801 return self._copied
800 def repo(self):
802 def repo(self):
801 return self._repo
803 return self._repo
802
804
@@ -1149,7 +1151,8 b' class filectx(basefilectx):'
1149 def size(self):
1151 def size(self):
1150 return self._filelog.size(self._filerev)
1152 return self._filelog.size(self._filerev)
1151
1153
1152 def renamed(self):
1154 @propertycache
1155 def _copied(self):
1153 """check if file was actually renamed in this changeset revision
1156 """check if file was actually renamed in this changeset revision
1154
1157
1155 If rename logged in file revision, we report copy for changeset only
1158 If rename logged in file revision, we report copy for changeset only
@@ -2064,8 +2067,6 b' class memfilectx(committablefilectx):'
2064 return self._data
2067 return self._data
2065 def size(self):
2068 def size(self):
2066 return len(self.data())
2069 return len(self.data())
2067 def renamed(self):
2068 return self._copied
2069
2070
2070 def remove(self, ignoremissing=False):
2071 def remove(self, ignoremissing=False):
2071 """wraps unlink for a repo's working directory"""
2072 """wraps unlink for a repo's working directory"""
General Comments 0
You need to be logged in to leave comments. Login now