comparison tests/test_util.py @ 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
comparison
equal deleted inserted replaced
869:db3a651494f9 870:1eb2a4428c42
351 res = commands.push(self.repo.ui, self.repo) 351 res = commands.push(self.repo.ui, self.repo)
352 after = len(self.repo) 352 after = len(self.repo)
353 self.assertEqual(expected_extra_back, after - before) 353 self.assertEqual(expected_extra_back, after - before)
354 return res 354 return res
355 355
356 def svnco(self, svnpath, rev, path): 356 def svnco(self, repo_path, svnpath, rev, path):
357 path = os.path.join(self.wc_path, path) 357 path = os.path.join(self.wc_path, path)
358 subpath = os.path.dirname(path) 358 subpath = os.path.dirname(path)
359 if not os.path.isdir(subpath): 359 if not os.path.isdir(subpath):
360 os.makedirs(subpath) 360 os.makedirs(subpath)
361 svnpath = fileurl(self.repo_path + '/' + svnpath) 361 svnpath = fileurl(repo_path + '/' + svnpath)
362 args = ['svn', 'co', '-r', rev, svnpath, path] 362 args = ['svn', 'co', '-r', rev, svnpath, path]
363 p = subprocess.Popen(args, 363 p = subprocess.Popen(args,
364 stdout=subprocess.PIPE, 364 stdout=subprocess.PIPE,
365 stderr=subprocess.STDOUT) 365 stderr=subprocess.STDOUT)
366 stdout, stderr = p.communicate() 366 stdout, stderr = p.communicate()