diff tests/test_util.py @ 886:d3ff5807f1bd

fold test_startrev and test_verify into a new test; test_verify_and_startrev
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sat, 12 May 2012 11:12:57 +0200
parents f2de043ac924
children c6388ed0ec0a
line wrap: on
line diff
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -297,15 +297,13 @@ class TestBase(unittest.TestCase):
         proc.communicate()
         return path
 
-    def load_and_fetch(self, fixture_name, subdir=None, stupid=False,
-                       layout='auto', startrev=0, externals=None,
-                       noupdate=True):
+    def fetch(self, repo_path, subdir=None, stupid=False, layout='auto', startrev=0,
+              externals=None, noupdate=True, dest=None):
         if layout == 'single':
             if subdir is None:
                 subdir = 'trunk'
         elif subdir is None:
             subdir = ''
-        repo_path = self.load_svndump(fixture_name)
         projectpath = repo_path
         if subdir:
             projectpath += '/' + subdir
@@ -326,7 +324,12 @@ class TestBase(unittest.TestCase):
 
         dispatch(cmd)
 
-        return hg.repository(testui(), self.wc_path), repo_path
+        return hg.repository(testui(), self.wc_path)
+
+    def load_and_fetch(self, fixture_name, *args, **opts):
+        repo_path = self.load_svndump(fixture_name)
+
+        return self.fetch(repo_path, *args, **opts), repo_path
 
     def _load_fixture_and_fetch(self, *args, **kwargs):
         repo, repo_path = self.load_and_fetch(*args, **kwargs)