# HG changeset patch # User Pierre-Yves David # Date 1490214498 -3600 # Node ID bd3d350471814369449bbd28c465261c966644fe # Parent 8e7b2918e1a31fe5c00b9473e13653bcbdbc33c6 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. diff -r 8e7b2918e1a3 -r bd3d35047181 hgext3rd/evolve/obsdiscovery.py --- 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')