Mercurial > hg
changeset 19574:a01436798988
basefilectx: move _changeid from filectx
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Sun, 11 Aug 2013 22:44:06 -0500 |
parents | dffad92ab709 |
children | 5a868137b830 |
files | mercurial/context.py |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Sun Aug 11 22:40:59 2013 -0500 +++ b/mercurial/context.py Sun Aug 11 22:44:06 2013 -0500 @@ -423,6 +423,15 @@ def _filelog(self): return self._repo.file(self._path) + @propertycache + def _changeid(self): + if '_changeid' in self.__dict__: + return self._changeid + elif '_changectx' in self.__dict__: + return self._changectx.rev() + else: + return self._filelog.linkrev(self._filerev) + class filectx(basefilectx): """A filecontext object makes access to data related to a particular filerevision convenient.""" @@ -473,15 +482,6 @@ return changectx(self._repo.unfiltered(), self._changeid) @propertycache - def _changeid(self): - if '_changeid' in self.__dict__: - return self._changeid - elif '_changectx' in self.__dict__: - return self._changectx.rev() - else: - return self._filelog.linkrev(self._filerev) - - @propertycache def _filenode(self): if '_fileid' in self.__dict__: return self._filelog.lookup(self._fileid)