##// END OF EJS Templates
basefilectx: move _filenode from filectx
Sean Farley -
r19575:5a868137 default
parent child Browse files
Show More
@@ -432,6 +432,13 b' class basefilectx(object):'
432 else:
432 else:
433 return self._filelog.linkrev(self._filerev)
433 return self._filelog.linkrev(self._filerev)
434
434
435 @propertycache
436 def _filenode(self):
437 if '_fileid' in self.__dict__:
438 return self._filelog.lookup(self._fileid)
439 else:
440 return self._changectx.filenode(self._path)
441
435 class filectx(basefilectx):
442 class filectx(basefilectx):
436 """A filecontext object makes access to data related to a particular
443 """A filecontext object makes access to data related to a particular
437 filerevision convenient."""
444 filerevision convenient."""
@@ -482,13 +489,6 b' class filectx(basefilectx):'
482 return changectx(self._repo.unfiltered(), self._changeid)
489 return changectx(self._repo.unfiltered(), self._changeid)
483
490
484 @propertycache
491 @propertycache
485 def _filenode(self):
486 if '_fileid' in self.__dict__:
487 return self._filelog.lookup(self._fileid)
488 else:
489 return self._changectx.filenode(self._path)
490
491 @propertycache
492 def _filerev(self):
492 def _filerev(self):
493 return self._filelog.rev(self._filenode)
493 return self._filelog.rev(self._filenode)
494
494
General Comments 0
You need to be logged in to leave comments. Login now