From 558ccfdb043ffcef2d63659ee43091a2667c6a27 Mon Sep 17 00:00:00 2001 From: Alexander Solovyov Date: Sat, 1 May 2010 15:00:21 +0300 Subject: [PATCH] slightly improve memctx api --- mercurial/context.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mercurial/context.py b/mercurial/context.py index 9f2b3bba27..a9daa7db42 100644 --- a/mercurial/context.py +++ b/mercurial/context.py @@ -935,12 +935,16 @@ class memctx(object): """get a file context from the working directory""" return self._filectxfn(self._repo, self, path) + def commit(self): + """commit context to the repo""" + return self._repo.commitctx(self) + class memfilectx(object): """memfilectx represents an in-memory file to commit. See memctx for more details. """ - def __init__(self, path, data, islink, isexec, copied): + def __init__(self, path, data, islink=False, isexec=False, copied=None): """ path is the normalized file path relative to repository root. data is the file content as a string.