obscache: use self instead of repo in obscacherepo.updatecaches()
authorAnton Shestakov <av6@dwimlabs.net>
Fri, 06 Apr 2018 14:26:24 +0800
changeset 3645 a2d06eba843f
parent 3644 4eea4a3ef11f
child 3646 0dd393a32567
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).
hgext3rd/evolve/obscache.py
--- a/hgext3rd/evolve/obscache.py	Wed Apr 04 16:29:48 2018 +0200
+++ b/hgext3rd/evolve/obscache.py	Fri Apr 06 14:26:24 2018 +0800
@@ -527,8 +527,8 @@
             @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):