mercurial/context.py
changeset 32239 c38c15d4ce48
parent 32238 8a660af9dbe3
child 32240 842ea95d45dc
equal deleted inserted replaced
32238:8a660af9dbe3 32239:c38c15d4ce48
   795         return self._changectx.phasestr()
   795         return self._changectx.phasestr()
   796     def manifest(self):
   796     def manifest(self):
   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 
   803     def path(self):
   805     def path(self):
   804         return self._path
   806         return self._path
  1147                              hint=_("set censor.policy to ignore errors"))
  1149                              hint=_("set censor.policy to ignore errors"))
  1148 
  1150 
  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
  1156         if file revisions linkrev points back to the changeset in question
  1159         if file revisions linkrev points back to the changeset in question
  1157         or both changeset parents contain different file revisions.
  1160         or both changeset parents contain different file revisions.
  2062 
  2065 
  2063     def data(self):
  2066     def data(self):
  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"""
  2072         # need to figure out what to do here
  2073         # need to figure out what to do here
  2073         del self._changectx[self._path]
  2074         del self._changectx[self._path]