Mercurial > hg
changeset 3966:b4eaa68dea1b
context: create a filectxt with filelog reuse
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Mon, 25 Dec 2006 18:57:55 +0100 |
parents | 2e5161335e65 |
children | dccb83241dd0 |
files | mercurial/context.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Mon Dec 25 17:43:47 2006 +0100 +++ b/mercurial/context.py Mon Dec 25 18:57:55 2006 +0100 @@ -93,11 +93,12 @@ return node - def filectx(self, path, fileid=None): + def filectx(self, path, fileid=None, filelog=None): """get a file context from this changeset""" if fileid is None: fileid = self.filenode(path) - return filectx(self._repo, path, fileid=fileid, changectx=self) + return filectx(self._repo, path, fileid=fileid, + changectx=self, filelog=filelog) def filectxs(self): """generate a file context for each file in this changeset's @@ -422,9 +423,10 @@ def children(self): return [] - def filectx(self, path): + def filectx(self, path, filelog=None): """get a file context from the working directory""" - return workingfilectx(self._repo, path, workingctx=self) + return workingfilectx(self._repo, path, workingctx=self, + filelog=filelog) def ancestor(self, c2): """return the ancestor context of self and c2"""