Mercurial > hg
diff mercurial/context.py @ 19288:ec367f203cb5
filectx: refactor filectx.rev() to use filectx._changeid
The code in filectx.rev() was identical to filectx._changeid. Fixing this
allows alternative filectx implementations to only override _changeid.
author | Durham Goode <durham@fb.com> |
---|---|
date | Thu, 30 May 2013 17:49:37 -0700 |
parents | 921b64e1f7b9 |
children | e0aa6fff8f02 |
line wrap: on
line diff
--- a/mercurial/context.py Mon Jun 03 17:20:45 2013 -0700 +++ b/mercurial/context.py Thu May 30 17:49:37 2013 -0700 @@ -503,14 +503,8 @@ return self._changectx.flags(self._path) def filelog(self): return self._filelog - def rev(self): - if '_changectx' in self.__dict__: - return self._changectx.rev() - if '_changeid' in self.__dict__: - return self._changectx.rev() - return self._filelog.linkrev(self._filerev) - + return self._changeid def linkrev(self): return self._filelog.linkrev(self._filerev) def node(self):