# HG changeset patch # User Benoit Boissinot # Date 1167069475 -3600 # Node ID b4eaa68dea1b8973a98e3a34d30c99f86c8fba13 # Parent 2e5161335e651275e52eec5185afcccae42cc87b context: create a filectxt with filelog reuse diff -r 2e5161335e65 -r b4eaa68dea1b mercurial/context.py --- 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"""