--- a/mercurial/util.py Mon Oct 08 18:11:56 2012 +0200
+++ b/mercurial/util.py Mon Oct 08 20:02:20 2012 +0200
@@ -244,9 +244,12 @@
self.name = func.__name__
def __get__(self, obj, type=None):
result = self.func(obj)
- setattr(obj, self.name, result)
+ self.cachevalue(obj, result)
return result
+ def cachevalue(self, obj, value):
+ setattr(obj, self.name, value)
+
def pipefilter(s, cmd):
'''filter string S through command CMD, returning its output'''
p = subprocess.Popen(cmd, shell=True, close_fds=closefds,