obshash: properly cache obshash value
The code was buggy and only cached non-nullid/non-inherited value. This was
previous hidden because we were using a 'propertycache' to cache the value on
the range object. This fixes it and restore a lot of performance.
--- a/hgext3rd/evolve/obsdiscovery.py Wed Mar 22 20:59:42 2017 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py Wed Mar 22 21:28:18 2017 +0100
@@ -444,7 +444,8 @@
sha = hashlib.sha1()
for p in pieces:
sha.update(p)
- obshash = cache[rangeid] = sha.digest()
+ obshash = sha.digest()
+ cache[rangeid] = obshash
return obshash
@eh.wrapfunction(obsolete.obsstore, '_addmarkers')