comparison tests/test_util.py @ 337:46e69be8e2c8

Reorganize to have a more conventional module structure. This means that hgsubversion now uses absolute imports instead of relative ones, which makes the tests more reliable.
author Augie Fackler <durin42@gmail.com>
date Wed, 13 May 2009 21:39:39 -0500
parents 3c3c3264c362
children 76c833526fbc
comparison
equal deleted inserted replaced
336:c0b943cef0c3 337:46e69be8e2c8
12 from mercurial import commands 12 from mercurial import commands
13 from mercurial import hg 13 from mercurial import hg
14 from mercurial import node 14 from mercurial import node
15 from mercurial import ui 15 from mercurial import ui
16 16
17 import util 17 from hgsubversion import util
18 18
19 # Fixtures that need to be pulled at a subdirectory of the repo path 19 # Fixtures that need to be pulled at a subdirectory of the repo path
20 subdir = {'truncatedhistory.svndump': '/project2', 20 subdir = {'truncatedhistory.svndump': '/project2',
21 'fetch_missing_files_subdir.svndump': '/foo', 21 'fetch_missing_files_subdir.svndump': '/foo',
22 'empty_dir_in_trunk_not_repo_root.svndump': '/project', 22 'empty_dir_in_trunk_not_repo_root.svndump': '/project',
48 48
49 def load_fixture_and_fetch(fixture_name, repo_path, wc_path, stupid=False, subdir='', noupdate=True): 49 def load_fixture_and_fetch(fixture_name, repo_path, wc_path, stupid=False, subdir='', noupdate=True):
50 load_svndump_fixture(repo_path, fixture_name) 50 load_svndump_fixture(repo_path, fixture_name)
51 if subdir: 51 if subdir:
52 repo_path += '/' + subdir 52 repo_path += '/' + subdir
53 53
54 _ui = ui.ui() 54 _ui = ui.ui()
55 _ui.setconfig('hgsubversion', 'stupid', str(stupid)) 55 _ui.setconfig('hgsubversion', 'stupid', str(stupid))
56 commands.clone(_ui, fileurl(repo_path), wc_path, noupdate=noupdate) 56 commands.clone(_ui, fileurl(repo_path), wc_path, noupdate=noupdate)
57 _ui = ui.ui() 57 _ui = ui.ui()
58 _ui.setconfig('hgsubversion', 'stupid', str(stupid)) 58 _ui.setconfig('hgsubversion', 'stupid', str(stupid))