comparison tests/test_fetch_branches.py @ 326:33736e2e25f0

alternate approach for supporting svn schemes for repository paths We now intercept the operations in the local repo class, and handle the relevant operation ourselves. This frees us from wrapping all relevant commands and replicating their functionality. The implementation is incomplete; only one test has been modified to use the standard Mercurial API with the changed URLs. Once changed, those tests will likely reveal bugs or missing features in the new wrappers. Also, new wrappers will be needed for handling conversion flags such as -A/--authormap.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Thu, 07 May 2009 20:50:53 +0200
parents 942f198b8ff5
children 46e69be8e2c8
comparison
equal deleted inserted replaced
320:1ba8ed29148e 326:33736e2e25f0
3 from mercurial import hg 3 from mercurial import hg
4 from mercurial import node 4 from mercurial import node
5 from mercurial import ui 5 from mercurial import ui
6 6
7 import test_util 7 import test_util
8 import wrappers
9 8
10 9
11 class TestFetchBranches(test_util.TestBase): 10 class TestFetchBranches(test_util.TestBase):
12 def _load_fixture_and_fetch(self, fixture_name, stupid, noupdate=True, 11 def _load_fixture_and_fetch(self, fixture_name, stupid, noupdate=True,
13 subdir=''): 12 subdir=''):
16 noupdate=noupdate, subdir=subdir) 15 noupdate=noupdate, subdir=subdir)
17 16
18 def _load_fixture_and_fetch_with_anchor(self, fixture_name, anchor): 17 def _load_fixture_and_fetch_with_anchor(self, fixture_name, anchor):
19 test_util.load_svndump_fixture(self.repo_path, fixture_name) 18 test_util.load_svndump_fixture(self.repo_path, fixture_name)
20 source = '%s#%s' % (test_util.fileurl(self.repo_path), anchor) 19 source = '%s#%s' % (test_util.fileurl(self.repo_path), anchor)
21 wrappers.clone(None, ui.ui(), source=source, dest=self.wc_path) 20 repo = hg.clone(ui.ui(), source=source, dest=self.wc_path)
22 return hg.repository(ui.ui(), self.wc_path) 21 return hg.repository(ui.ui(), self.wc_path)
23 22
24 def test_unrelatedbranch(self, stupid=False): 23 def test_unrelatedbranch(self, stupid=False):
25 repo = self._load_fixture_and_fetch('unrelatedbranch.svndump', stupid) 24 repo = self._load_fixture_and_fetch('unrelatedbranch.svndump', stupid)
26 heads = [repo[n] for n in repo.heads()] 25 heads = [repo[n] for n in repo.heads()]