Mercurial > hg-stable
changeset 3123:4ea58eb3f0c9
filelog: make metadata method private
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 17 Sep 2006 22:38:06 -0500 |
parents | da85145d4571 |
children | 4d021b91cb26 |
files | mercurial/context.py mercurial/filelog.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Sun Sep 17 22:20:44 2006 -0500 +++ b/mercurial/context.py Sun Sep 17 22:38:06 2006 -0500 @@ -111,13 +111,13 @@ def manifest(self): return self.changectx().manifest() def data(self): return self._filelog.read(self._filenode) - def metadata(self): return self._filelog.readmeta(self._filenode) def renamed(self): return self._filelog.renamed(self._filenode) def path(self): return self._path def parents(self): p = [ (self._path, n) for n in self._filelog.parents(self._filenode) ] r = self.renamed() + if r: p[0] = r return [ filectx(self._repo, p, fileid=n) for p,n in p if n != nullid ]
--- a/mercurial/filelog.py Sun Sep 17 22:20:44 2006 -0500 +++ b/mercurial/filelog.py Sun Sep 17 22:38:06 2006 -0500 @@ -37,7 +37,7 @@ s = t.index('\1\n', 2) return t[s+2:] - def readmeta(self, node): + def _readmeta(self, node): t = self.revision(node) if not t.startswith('\1\n'): return {} @@ -60,7 +60,7 @@ def renamed(self, node): if self.parents(node)[0] != nullid: return False - m = self.readmeta(node) + m = self._readmeta(node) if m and m.has_key("copy"): return (m["copy"], bin(m["copyrev"])) return False