changeset 2374:6308a8c04cce

obshashrange: keep value fetched from sql in memory This will reduce the number of roundtrip to the data base we need.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 16 May 2017 11:41:36 +0200
parents 2a1aad0fd8bf
children 8e42b33ea051
files hgext3rd/evolve/obsdiscovery.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obsdiscovery.py	Tue May 16 11:37:45 2017 +0200
+++ b/hgext3rd/evolve/obsdiscovery.py	Tue May 16 11:41:36 2017 +0200
@@ -456,6 +456,7 @@
             obshash = self._con.execute(_queryobshash, nrange).fetchone()
             if obshash is not None:
                 value = obshash[0]
+            self._data[rangeid] = value
         return value
 
     def __setitem__(self, rangeid, obshash):