diff tests/test_utility_commands.py @ 1224:6b3e9cb69761 stable

test_utility_commands: call makememfilectx
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 02 Jun 2014 19:55:32 -0500
parents cd0d14e25757
children 180e0d5fba2e
line wrap: on
line diff
--- a/tests/test_utility_commands.py
+++ b/tests/test_utility_commands.py
@@ -16,6 +16,7 @@ from hgsubversion import util
 from hgsubversion import svncommands
 from hgsubversion import verify
 from hgsubversion import wrappers
+from hgsubversion import compathacks
 
 expected_info_output = '''URL: %(repourl)s/%(branch)s
 Repository Root: %(repourl)s
@@ -160,11 +161,12 @@ class UtilityTests(test_util.TestBase):
         u.pushbuffer()
         parents = (self.repo['the_branch'].node(), revlog.nullid,)
         def filectxfn(repo, memctx, path):
-            return context.memfilectx(path=path,
-                                      data='added',
-                                      islink=False,
-                                      isexec=False,
-                                      copied=False)
+            return compathacks.makememfilectx(repo,
+                                              path=path,
+                                              data='added',
+                                              islink=False,
+                                              isexec=False,
+                                              copied=False)
         ctx = context.memctx(self.repo,
                              parents,
                              'automated test',
@@ -203,11 +205,12 @@ class UtilityTests(test_util.TestBase):
         u = self.ui()
         parents = (self.repo['the_branch'].node(), revlog.nullid,)
         def filectxfn(repo, memctx, path):
-            return context.memfilectx(path=path,
-                                      data='added',
-                                      islink=False,
-                                      isexec=False,
-                                      copied=False)
+            return compathacks.makememfilectx(repo,
+                                              path=path,
+                                              data='added',
+                                              islink=False,
+                                              isexec=False,
+                                              copied=False)
         ctx = context.memctx(self.repo,
                              parents,
                              'automated test',
@@ -233,11 +236,12 @@ class UtilityTests(test_util.TestBase):
         self._load_fixture_and_fetch('two_revs.svndump')
         parents = (self.repo[0].node(), revlog.nullid,)
         def filectxfn(repo, memctx, path):
-            return context.memfilectx(path=path,
-                                      data='added',
-                                      islink=False,
-                                      isexec=False,
-                                      copied=False)
+            return compathacks.makememfilectx(repo,
+                                              path=path,
+                                              data='added',
+                                              islink=False,
+                                              isexec=False,
+                                              copied=False)
         ctx = context.memctx(self.repo,
                              parents,
                              'automated test',