# HG changeset patch # User Sean Farley # Date 1401757027 18000 # Node ID f1dd304be8aa59efd2c4420dcca23294f983d42c # Parent e73df57b2b073e12228f2da5f8aded0a7472fa2a test_single_dir_push: call makememfilectx diff --git a/tests/test_single_dir_push.py b/tests/test_single_dir_push.py --- a/tests/test_single_dir_push.py +++ b/tests/test_single_dir_push.py @@ -23,17 +23,19 @@ class TestSingleDirPush(test_util.TestBa subdir='') def file_callback(repo, memctx, path): if path == 'adding_file': - return context.memfilectx(path=path, - data='foo', - islink=False, - isexec=False, - copied=False) + return compathacks.makememfilectx(repo, + path=path, + data='foo', + islink=False, + isexec=False, + copied=False) elif path == 'adding_binary': - return context.memfilectx(path=path, - data='\0binary', - islink=False, - isexec=False, - copied=False) + return compathacks.makememfilectx(repo, + path=path, + data='\0binary', + islink=False, + isexec=False, + copied=False) raise IOError(errno.EINVAL, 'Invalid operation: ' + path) ctx = context.memctx(repo, (repo['tip'].node(), node.nullid), @@ -62,11 +64,12 @@ class TestSingleDirPush(test_util.TestBa layout='single', subdir='trunk') def filectxfn(repo, memctx, path): - return context.memfilectx(path=path, - data='contents of %s' % path, - islink=False, - isexec=False, - copied=False) + return compathacks.makememfilectx(repo, + path=path, + data='contents of %s' % path, + islink=False, + isexec=False, + copied=False) ctx = context.memctx(repo, (repo['tip'].node(), node.nullid), 'automated test', @@ -95,11 +98,12 @@ class TestSingleDirPush(test_util.TestBa subdir='trunk') self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed'}) def file_callback(repo, memctx, path): - return context.memfilectx(path=path, - data='data of %s' % path, - islink=False, - isexec=False, - copied=False) + return compathacks.makememfilectx(repo, + path=path, + data='data of %s' % path, + islink=False, + isexec=False, + copied=False) for fn in ['one', 'two']: ctx = context.memctx(repo, (repo['tip'].node(), node.nullid), @@ -126,11 +130,12 @@ class TestSingleDirPush(test_util.TestBa def file_callback(data): def cb(repo, memctx, path): if path == data: - return context.memfilectx(path=path, - data=data, - islink=False, - isexec=False, - copied=False) + return compathacks.makememfilectx(repo, + path=path, + data=data, + islink=False, + isexec=False, + copied=False) raise IOError(errno.EINVAL, 'Invalid operation: ' + path) return cb @@ -174,11 +179,12 @@ class TestSingleDirPush(test_util.TestBa def file_callback(repo, memctx, path): if path == 'adding_file': - return context.memfilectx(path=path, - data='foo', - islink=False, - isexec=False, - copied=False) + return compathacks.makememfilectx(repo, + path=path, + data='foo', + islink=False, + isexec=False, + copied=False) raise IOError(errno.EINVAL, 'Invalid operation: ' + path) ctx = context.memctx(self.repo, (self.repo['tip'].node(), node.nullid),