Mercurial > public > mercurial-scm > hg
diff mercurial/context.py @ 9102:bbc78cb1bf15
Merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 09 Jul 2009 19:49:02 -0500 |
parents | 10532b29cdee 71d26ae62fbb |
children | 31177742f54a |
line wrap: on
line diff
--- 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