# HG changeset patch # User Durham Goode # Date 1369961377 25200 # Node ID ec367f203cb5a0427b89f76c8da37e4d2062b614 # Parent 8b04e1344111ba696ff7cfaa59a48966b43332ee 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. diff -r 8b04e1344111 -r ec367f203cb5 mercurial/context.py --- 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):