From patchwork Tue Jul 9 21:54:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [12,of,14,RFC] memfilectx: change init to take a repo object From: Sean Farley X-Patchwork-Id: 1821 Message-Id: <56574c855bf31605fc2f.1373406883@laptop.local> To: mercurial-devel@selenic.com Date: Tue, 09 Jul 2013 16:54:43 -0500 # HG changeset patch # User Sean Farley # Date 1373324004 18000 # Mon Jul 08 17:53:24 2013 -0500 # Node ID 56574c855bf31605fc2f7a696181f9d84a7eb64f # Parent 1fa8870e0ae8dc5f23f5326470c5fbc93f63a95b memfilectx: change init to take a repo object diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1345,19 +1345,20 @@ class memfilectx(object): """memfilectx represents an in-memory file to commit. See memctx for more details. """ - def __init__(self, path, data, islink=False, isexec=False, copied=None): + def __init__(self, repo, path, data, islink=False, isexec=False, copied=None): """ + repo is the current localrepo. path is the normalized file path relative to repository root. data is the file content as a string. islink is True if the file is a symbolic link. isexec is True if the file is executable. copied is the source file path if current file was copied in the revision being committed, or None.""" - self._path = path + super(workingfilectx, self).__init__(repo, path, data) self._data = data self._flags = (islink and 'l' or '') + (isexec and 'x' or '') self._copied = None if copied: self._copied = (copied, nullid)