changeset 870:1eb2a4428c42

test_util: pass repo_path to svnco() explicitely
author Patrick Mezard <patrick@mezard.eu>
date Thu, 19 Apr 2012 18:29:30 +0200
parents db3a651494f9
children 51fd75ae62b9
files tests/test_externals.py tests/test_util.py
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_externals.py
+++ b/tests/test_externals.py
@@ -346,9 +346,9 @@ HEAD subdir2/deps/project2
             ('subdir1/a', 'subdir1/a', 'a'),
             ('subdir2/a', 'subdir2/a', 'a'),
             ]
-        self.svnco('externals/project2', '2', 'dir/deps/project2')
-        self.svnco('externals/project1', '2', 'subdir1/deps/project1')
-        self.svnco('externals/project2', '2', 'subdir2/deps/project2')
+        self.svnco(repo_path, 'externals/project2', '2', 'dir/deps/project2')
+        self.svnco(repo_path, 'externals/project1', '2', 'subdir1/deps/project1')
+        self.svnco(repo_path, 'externals/project2', '2', 'subdir2/deps/project2')
         self.commitchanges(changes)
         self.pushrevisions(stupid)
         self.assertchanges(changes, self.repo['tip'])
@@ -371,8 +371,8 @@ HEAD subdir1/deps/project2
             # This removal used to trigger the parent directory removal
             ('subdir1/a', None, None),
             ]
-        self.svnco('externals/project1', '2', 'subdir1/deps/project1')
-        self.svnco('externals/project2', '2', 'subdir1/deps/project2')
+        self.svnco(repo_path, 'externals/project1', '2', 'subdir1/deps/project1')
+        self.svnco(repo_path, 'externals/project2', '2', 'subdir1/deps/project2')
         self.commitchanges(changes)
         self.pushrevisions(stupid)
         self.assertchanges(changes, self.repo['tip'])
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -353,12 +353,12 @@ class TestBase(unittest.TestCase):
         self.assertEqual(expected_extra_back, after - before)
         return res
 
-    def svnco(self, svnpath, rev, path):
+    def svnco(self, repo_path, svnpath, rev, path):
         path = os.path.join(self.wc_path, path)
         subpath = os.path.dirname(path)
         if not os.path.isdir(subpath):
             os.makedirs(subpath)
-        svnpath = fileurl(self.repo_path + '/' + svnpath)
+        svnpath = fileurl(repo_path + '/' + svnpath)
         args = ['svn', 'co', '-r', rev, svnpath, path]
         p = subprocess.Popen(args,
                              stdout=subprocess.PIPE,