changeset 5274:498dc888ff40

stablerangecache: sanity check subranges Try to detect invalid conditions on insert as would result in deep recursions and final aborts much later. This has been observed on two different machines and the check makes it hopefully possible to find the origin of the problem.
author Joerg Sonnenberger <joerg@bec.de>
date Sun, 03 May 2020 01:45:04 +0200
parents aca826b5bd4d
children 417503ef667d
files hgext3rd/evolve/stablerangecache.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/stablerangecache.py	Sun May 03 20:11:37 2020 +0800
+++ b/hgext3rd/evolve/stablerangecache.py	Sun May 03 01:45:04 2020 +0200
@@ -234,6 +234,7 @@
 
     def _setsub(self, rangeid, value):
         assert rangeid not in self._unsavedsubranges
+        assert 0 <= rangeid[1] <= rangeid[0], rangeid
         self._unsavedsubranges[rangeid] = value
         super(stablerangesqlbase, self)._setsub(rangeid, value)