Mercurial > hg
changeset 3207:0790dce2f3a8
Add lookup method to filectx
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Fri, 29 Sep 2006 16:26:09 -0700 |
parents | 79fd7a92f3e2 |
children | e7b7906cc47e |
files | mercurial/context.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Fri Sep 29 16:26:09 2006 -0700 +++ b/mercurial/context.py Fri Sep 29 16:26:09 2006 -0700 @@ -130,6 +130,12 @@ def __repr__(self): return "<filectx %s@%s>" % (self.path(), short(self.node())) + def filectx(self, fileid): + '''opens an arbitrary revision of the file without + opening a new filelog''' + return filectx(self._repo, self._path, fileid=fileid, + filelog=self._filelog) + def filerev(self): return self._filerev def filenode(self): return self._filenode def filelog(self): return self._filelog