Mercurial > evolve
changeset 2156:e57f28fafe41
stablerange: make sure nobody use the 'stablekey' property outside the class
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Wed, 22 Mar 2017 17:48:39 +0100 |
parents | 89ce52e855ed |
children | e3b75a5d6b38 |
files | hgext3rd/evolve/stablerange.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/stablerange.py Wed Mar 22 17:47:09 2017 +0100 +++ b/hgext3rd/evolve/stablerange.py Wed Mar 22 17:48:39 2017 +0100 @@ -357,7 +357,7 @@ def __eq__(self, other): if type(self) != type(other): raise NotImplementedError() - return self.stablekey == other.stablekey + return self._stablekey == other._stablekey def __getitem__(self, idx): """small helper function to prepare for the migration to tuple""" @@ -370,10 +370,10 @@ @util.propertycache def _id(self): - return hash(self.stablekey) + return hash(self._stablekey) @util.propertycache - def stablekey(self): + def _stablekey(self): return (self[0], self.index) def __len__(self):