[PATCH evolve-ext] evolve: fixing obscache invalidation

Rodrigo Damazio Bovendorp rdamazio at google.com
Wed May 17 06:38:25 UTC 2017


# HG changeset patch
# User Rodrigo Damazio Bovendorp <rdamazio at google.com>
# Date 1495003030 25200
#      Tue May 16 23:37:10 2017 -0700
# Node ID 8a19c6e8a1125be6bf6a5c97dc345c37c39a1189
# Parent  2241433a77e543ee068039fa2fb9ad514decca93
evolve: fixing obscache invalidation

This was missing a call to the parent's destroyed(), such that any transaction
after stripping some nodes would result in a crash (by attempting to read nodes
which were stripped).

diff --git a/README b/README
--- a/README
+++ b/README
@@ -119,6 +119,7 @@
  - topic: have thg display topic name if possible,
  - obscache: more efficient update in the (rare) case of a transaction adding
    markers without changesets
+ - obscache: fix more cache invalidation propagation
  - obshashrange-cache: update incrementally in the (common) case of a
    transaction not affecting existing range,
  - obshashrange-cache: keep the cache mostly warm after each transaction.
diff --git a/hgext3rd/evolve/obscache.py b/hgext3rd/evolve/obscache.py
--- a/hgext3rd/evolve/obscache.py
+++ b/hgext3rd/evolve/obscache.py
@@ -482,6 +482,7 @@
         def destroyed(self):
             if 'obsstore' in vars(self):
                 self.obsstore.obscache.clear()
+            super(obscacherepo, self).destroyed()
 
         def transaction(self, *args, **kwargs):
             tr = super(obscacherepo, self).transaction(*args, **kwargs)


More information about the Mercurial-devel mailing list