[PATCH 12 of 14 RFC] memfilectx: change init to take a repo object
Sean Farley
sean.michael.farley at gmail.com
Tue Jul 9 16:54:43 CDT 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# 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)
More information about the Mercurial-devel
mailing list