comparison tests/test_fetch_truncated.py @ 331:75f082b5897e

Switch to using url scheme wrappers instead of duplicating each command we wrap. The 'hg svn url' command has been killed; the replacement is '.hg/hgrc'. More stuff related to its disappearance has been stripped, including two tests. HgChangeReceiver now takes a UUID argument, which it uses to ensure that remote repositories remain unchanged. This is a temporary solution, and I'm not entirely satisfied with how it's done either. Access to the UUID file has been isolated in a HgChangeReceiver property. Some more tests have been updated to use ui.pushbuffer()/popbuffer(), and to pass through the Mercurial API. Moved the arguments to wrappers.pull() to the UI configuration. Also, remove HgChangeReceiver.opts in favour of a 'usebranchnames' instance & configuration variable. The name is taken from the ConvertExtension.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 15 May 2009 19:18:43 +0200
parents ffccf0080e54
children d96aa92d9ad9
comparison
equal deleted inserted replaced
330:5f8f2fd4fd54 331:75f082b5897e
1 import unittest 1 import unittest
2 2
3 from mercurial import commands
3 from mercurial import hg 4 from mercurial import hg
4 from mercurial import ui 5 from mercurial import ui
5 6
6 import wrappers
7 import test_util 7 import test_util
8 8
9 class TestFetchTruncatedHistory(test_util.TestBase): 9 class TestFetchTruncatedHistory(test_util.TestBase):
10 def test_truncated_history(self, stupid=False): 10 def test_truncated_history(self, stupid=False):
11 # Test repository does not follow the usual layout 11 # Test repository does not follow the usual layout
12 test_util.load_svndump_fixture(self.repo_path, 'truncatedhistory.svndump') 12 test_util.load_svndump_fixture(self.repo_path, 'truncatedhistory.svndump')
13 svn_url = test_util.fileurl(self.repo_path + '/project2') 13 svn_url = test_util.fileurl(self.repo_path + '/project2')
14 wrappers.clone(None, ui.ui(), source=svn_url, 14 _ui = ui.ui()
15 dest=self.wc_path, stupid=stupid, 15 _ui.setconfig('hgsubversion', 'stupid', str(stupid))
16 noupdate=True) 16 commands.clone(_ui, svn_url, self.wc_path, noupdate=True)
17 repo = hg.repository(ui.ui(), self.wc_path) 17 repo = hg.repository(_ui, self.wc_path)
18 18
19 # We are converting /project2/trunk coming from: 19 # We are converting /project2/trunk coming from:
20 # 20 #
21 # Changed paths: 21 # Changed paths:
22 # D /project1 22 # D /project1