Mercurial > evolve
changeset 3306:b67e0f676a28
stablerange: add an assert to detect buggy range
Nothing can be negative in there, we add an assert to make sure it is so.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 10 Dec 2017 05:17:04 +0100 |
parents | a878d9406841 |
children | a1ab2588a628 |
files | hgext3rd/evolve/stablerange.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/stablerange.py Sun Dec 10 04:57:19 2017 +0100 +++ b/hgext3rd/evolve/stablerange.py Sun Dec 10 05:17:04 2017 +0100 @@ -312,6 +312,7 @@ return self.depthrev(repo, headrev) - index def subranges(self, repo, rangeid): + assert 0 <= rangeid[1] <= rangeid[0], rangeid cached = self._getsub(rangeid) if cached is not None: return cached