Patchwork [2,of,3,evolve-ext] stablerangecache: use self instead of repo in stablerangerepo.stablerange()

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

Comments

Anton Shestakov - April 6, 2018, 6:58 a.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1522996596 -28800
#      Fri Apr 06 14:36:36 2018 +0800
# Node ID ce9f0f1cfbc2bc7fd305625d9da79953fcd43fe1
# Parent  58ee2c2c7cdf8671c181035c5293bbbc91a3f05f
stablerangecache: use self instead of repo in stablerangerepo.stablerange()

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/stablerangecache.py b/hgext3rd/evolve/stablerangecache.py
--- a/hgext3rd/evolve/stablerangecache.py
+++ b/hgext3rd/evolve/stablerangecache.py
@@ -353,8 +353,8 @@  def setupcache(ui, repo):
 
         @localrepo.unfilteredpropertycache
         def stablerange(self):
-            cache = mergepointsql(repo)
-            cache.update(repo)
+            cache = mergepointsql(self)
+            cache.update(self)
             return cache
 
         @localrepo.unfilteredmethod