--- a/mercurial/context.py Sat Jul 04 14:18:15 2009 +0100
+++ b/mercurial/context.py Thu Jul 09 19:49:02 2009 -0500
@@ -293,6 +293,7 @@
def linkrev(self): return self._filelog.linkrev(self._filerev)
def node(self): return self._changectx.node()
+ def hex(self): return hex(self.node())
def user(self): return self._changectx.user()
def date(self): return self._changectx.date()
def files(self): return self._changectx.files()
@@ -381,11 +382,11 @@
child[0][b1:b2] = parent[0][a1:a2]
return child
- getlog = util.cachefunc(lambda x: self._repo.file(x))
+ getlog = util.lrucachefunc(lambda x: self._repo.file(x))
def getctx(path, fileid):
log = path == self._path and self._filelog or getlog(path)
return filectx(self._repo, path, fileid=fileid, filelog=log)
- getctx = util.cachefunc(getctx)
+ getctx = util.lrucachefunc(getctx)
def parents(f):
# we want to reuse filectx objects as much as possible