dualsourcecache: add a cache name
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 16 May 2017 12:18:30 +0200
changeset 2376 12386f7f5056
parent 2375 8e42b33ea051
child 2377 413fe685bfd0
dualsourcecache: add a cache name This will be used to automatically log message for blackbox
hgext3rd/evolve/obscache.py
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/obscache.py	Tue May 16 12:17:13 2017 +0200
+++ b/hgext3rd/evolve/obscache.py	Tue May 16 12:18:30 2017 +0200
@@ -139,6 +139,7 @@
     # - obsstore-file-size (in bytes),
     # - obsstore "cache key"
     emptykey = (node.nullrev, node.nullid, 0, 0, node.nullid)
+    _cachename = None # used for error message
 
     def __init__(self):
         super(dualsourcecache, self).__init__()
@@ -335,6 +336,7 @@
     _filepath = 'cache/evoext-obscache-00'
     _headerformat = '>q20sQQ20s'
 
+    _cachename = 'evo-ext-obscache' # used for error message
 
     def __init__(self, repo):
         super(obscache, self).__init__()
--- a/hgext3rd/evolve/obsdiscovery.py	Tue May 16 12:17:13 2017 +0200
+++ b/hgext3rd/evolve/obsdiscovery.py	Tue May 16 12:18:30 2017 +0200
@@ -420,6 +420,8 @@
 
     _schemaversion = 1
 
+    _cachename = 'evo-ext-obshashrange' # used for error message
+
     def __init__(self, repo):
         super(_obshashcache, self).__init__()
         self._path = repo.vfs.join('cache/evoext_obshashrange_v1.sqlite')