comparison tests/test_rebuildmeta.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 78db88de9622 3bfb7e985c47
comparison
equal deleted inserted replaced
866:20e73b5ab6f7 867:50c13e01c7e3
26 def _do_case(self, name, stupid, single): 26 def _do_case(self, name, stupid, single):
27 subdir = test_util.subdir.get(name, '') 27 subdir = test_util.subdir.get(name, '')
28 layout = 'auto' 28 layout = 'auto'
29 if single: 29 if single:
30 layout = 'single' 30 layout = 'single'
31 self._load_fixture_and_fetch(name, subdir=subdir, stupid=stupid, layout=layout) 31 repo, repo_path = self.load_and_fetch(name, subdir=subdir, stupid=stupid,
32 layout=layout)
32 assert len(self.repo) > 0 33 assert len(self.repo) > 0
33 wc2_path = self.wc_path + '_clone' 34 wc2_path = self.wc_path + '_clone'
34 u = ui.ui() 35 u = ui.ui()
35 src, dest = test_util.hgclone(u, self.wc_path, wc2_path, update=False) 36 src, dest = test_util.hgclone(u, self.wc_path, wc2_path, update=False)
36 37
42 origchildren = getattr(context.changectx, 'children') 43 origchildren = getattr(context.changectx, 'children')
43 extensions.wrapfunction(context.changectx, 'children', failfn) 44 extensions.wrapfunction(context.changectx, 'children', failfn)
44 45
45 try: 46 try:
46 svncommands.rebuildmeta(u, dest, 47 svncommands.rebuildmeta(u, dest,
47 args=[test_util.fileurl(self.repo_path + 48 args=[test_util.fileurl(repo_path +
48 subdir), ]) 49 subdir), ])
49 finally: 50 finally:
50 # remove the wrapper 51 # remove the wrapper
51 context.changectx.children = origchildren 52 context.changectx.children = origchildren
52 53