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.
--- 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)