diff tests/test_single_dir_push.py @ 1205:f1dd304be8aa

test_single_dir_push: call makememfilectx
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 02 Jun 2014 19:57:07 -0500
parents 6e1dbf6cbc92
children c6b01fd34694
line wrap: on
line diff
--- 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),