comparison tests/comprehensive/test_stupid_pull.py @ 867:50c13e01c7e3

test_util: add a load_and_fetch() returning the repo_path
author Patrick Mezard <patrick@mezard.eu>
date Thu, 19 Apr 2012 18:29:28 +0200
parents 312b37bc5e20
children 3bfb7e985c47
comparison
equal deleted inserted replaced
866:20e73b5ab6f7 867:50c13e01c7e3
17 from hgsubversion import wrappers 17 from hgsubversion import wrappers
18 18
19 19
20 def _do_case(self, name, layout): 20 def _do_case(self, name, layout):
21 subdir = test_util.subdir.get(name, '') 21 subdir = test_util.subdir.get(name, '')
22 self._load_fixture_and_fetch(name, subdir=subdir, stupid=False, layout=layout) 22 repo, repo_path = self.load_and_fetch(name, subdir=subdir, stupid=False,
23 layout=layout)
23 assert len(self.repo) > 0, 'Repo had no changes, maybe you need to add a subdir entry in test_util?' 24 assert len(self.repo) > 0, 'Repo had no changes, maybe you need to add a subdir entry in test_util?'
24 wc2_path = self.wc_path + '_stupid' 25 wc2_path = self.wc_path + '_stupid'
25 u = ui.ui() 26 u = ui.ui()
26 checkout_path = self.repo_path 27 checkout_path = repo_path
27 if subdir: 28 if subdir:
28 checkout_path += '/' + subdir 29 checkout_path += '/' + subdir
29 u.setconfig('hgsubversion', 'stupid', '1') 30 u.setconfig('hgsubversion', 'stupid', '1')
30 u.setconfig('hgsubversion', 'layout', layout) 31 u.setconfig('hgsubversion', 'layout', layout)
31 test_util.hgclone(u, test_util.fileurl(checkout_path), wc2_path, update=False) 32 test_util.hgclone(u, test_util.fileurl(checkout_path), wc2_path, update=False)