--- a/hgext3rd/evolve/stablerangecache.py Mon Aug 27 00:28:19 2018 +0200
+++ b/hgext3rd/evolve/stablerangecache.py Mon Aug 27 00:35:51 2018 +0200
@@ -225,7 +225,14 @@
def _save(self, repo):
try:
return self._trysave(repo)
- except sqlite3.OperationalError as exc:
+ except (sqlite3.OperationalError, sqlite3.IntegrityError) as exc:
+ # Catch error that may arise under stress
+ #
+ # operational error catch read-only and locked database
+ # IntegrityError catch Unique constraint error that may arise
+ if '_con' in vars(self):
+ del self._con
+ self._unsavedsubranges.clear()
repo.ui.log('evoext-cache', 'error while saving new data: %s' % exc)
def _trysave(self, repo):