##// END OF EJS Templates
basefilectx: move _changeid from filectx
Sean Farley -
r19574:a0143679 default
parent child Browse files
Show More
@@ -423,6 +423,15 b' class basefilectx(object):'
423 def _filelog(self):
423 def _filelog(self):
424 return self._repo.file(self._path)
424 return self._repo.file(self._path)
425
425
426 @propertycache
427 def _changeid(self):
428 if '_changeid' in self.__dict__:
429 return self._changeid
430 elif '_changectx' in self.__dict__:
431 return self._changectx.rev()
432 else:
433 return self._filelog.linkrev(self._filerev)
434
426 class filectx(basefilectx):
435 class filectx(basefilectx):
427 """A filecontext object makes access to data related to a particular
436 """A filecontext object makes access to data related to a particular
428 filerevision convenient."""
437 filerevision convenient."""
@@ -473,15 +482,6 b' class filectx(basefilectx):'
473 return changectx(self._repo.unfiltered(), self._changeid)
482 return changectx(self._repo.unfiltered(), self._changeid)
474
483
475 @propertycache
484 @propertycache
476 def _changeid(self):
477 if '_changeid' in self.__dict__:
478 return self._changeid
479 elif '_changectx' in self.__dict__:
480 return self._changectx.rev()
481 else:
482 return self._filelog.linkrev(self._filerev)
483
484 @propertycache
485 def _filenode(self):
485 def _filenode(self):
486 if '_fileid' in self.__dict__:
486 if '_fileid' in self.__dict__:
487 return self._filelog.lookup(self._fileid)
487 return self._filelog.lookup(self._fileid)
General Comments 0
You need to be logged in to leave comments. Login now