Patchwork [1,of,3,evolve-ext] obscache: use self instead of repo in obscacherepo.updatecaches()

login
register
mail settings
Submitter Anton Shestakov
Date April 6, 2018, 6:58 a.m.
Message ID <58ee2c2c7cdf8671c181.1522997914@neuro>
Download mbox | patch
Permalink /patch/30424/
State Accepted
Headers show

Comments

Anton Shestakov - April 6, 2018, 6:58 a.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1522995984 -28800
#      Fri Apr 06 14:26:24 2018 +0800
# Node ID 58ee2c2c7cdf8671c181035c5293bbbc91a3f05f
# Parent  01108d67523ff366e18ba324e64edf527d8df1e5
obscache: use self instead of repo in obscacherepo.updatecaches()

Referring to repo here was somehow preventing it from being garbage-collected
(important in hgweb, where currently every request gets a new repo).

Patch

diff --git a/hgext3rd/evolve/obscache.py b/hgext3rd/evolve/obscache.py
--- a/hgext3rd/evolve/obscache.py
+++ b/hgext3rd/evolve/obscache.py
@@ -527,8 +527,8 @@  def setupcache(ui, repo):
             @localrepo.unfilteredmethod
             def updatecaches(self, tr=None, **kwargs):
                 super(obscacherepo, self).updatecaches(tr, **kwargs)
-                self.obsstore.obscache.update(repo)
-                self.obsstore.obscache.save(repo)
+                self.obsstore.obscache.update(self)
+                self.obsstore.obscache.save(self)
 
         else:
             def transaction(self, *args, **kwargs):