Mercurial > hgsubversion
diff tests/test_fetch_mappings.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 | 2c0649064455 |
line wrap: on
line diff
--- a/tests/test_fetch_mappings.py +++ b/tests/test_fetch_mappings.py @@ -3,11 +3,11 @@ import os import unittest +from mercurial import commands from mercurial import ui from mercurial import node import test_util -import wrappers class MapTests(test_util.TestBase): @property @@ -23,8 +23,11 @@ class MapTests(test_util.TestBase): authormap = open(self.authors, 'w') authormap.write("Augie=Augie Fackler <durin42@gmail.com>\n") authormap.close() - wrappers.clone(None, ui.ui(), source=test_util.fileurl(self.repo_path), - dest=self.wc_path, stupid=stupid, svn_authors=self.authors) + _ui = ui.ui() + _ui.setconfig('hgsubversion', 'stupid', str(stupid)) + _ui.setconfig('hgsubversion', 'authormap', self.authors) + commands.clone(_ui, test_util.fileurl(self.repo_path), + self.wc_path, authors=self.authors) self.assertEqual(self.repo[0].user(), 'Augie Fackler <durin42@gmail.com>') self.assertEqual(self.repo['tip'].user(), @@ -38,9 +41,11 @@ class MapTests(test_util.TestBase): authormap = open(self.authors, 'w') authormap.write("evil=Testy <test@test>") authormap.close() - wrappers.clone(None, ui.ui(), source=test_util.fileurl(self.repo_path), - dest=self.wc_path, stupid=stupid, - svn_authors=self.authors) + _ui = ui.ui() + _ui.setconfig('hgsubversion', 'stupid', str(stupid)) + _ui.setconfig('hgsubversion', 'authormap', self.authors) + commands.clone(_ui, test_util.fileurl(self.repo_path), + self.wc_path, authors=self.authors) self.assertEqual(self.repo[0].user(), 'Augie@5b65bade-98f3-4993-a01f-b7a6710da339') self.assertEqual(self.repo['tip'].user(), @@ -54,9 +59,11 @@ class MapTests(test_util.TestBase): filemap = open(self.filemap, 'w') filemap.write("include alpha\n") filemap.close() - wrappers.clone(None, ui.ui(), source=test_util.fileurl(self.repo_path), - dest=self.wc_path, stupid=stupid, - svn_filemap=self.filemap) + _ui = ui.ui() + _ui.setconfig('hgsubversion', 'stupid', str(stupid)) + _ui.setconfig('hgsubversion', 'filemap', self.filemap) + commands.clone(_ui, test_util.fileurl(self.repo_path), + self.wc_path, filemap=self.filemap) self.assertEqual(node.hex(self.repo[0].node()), '88e2c7492d83e4bf30fbb2dcbf6aa24d60ac688d') self.assertEqual(node.hex(self.repo['default'].node()), 'e524296152246b3837fe9503c83b727075835155') @@ -68,9 +75,11 @@ class MapTests(test_util.TestBase): filemap = open(self.filemap, 'w') filemap.write("exclude alpha\n") filemap.close() - wrappers.clone(None, ui.ui(), source=test_util.fileurl(self.repo_path), - dest=self.wc_path, stupid=stupid, - svn_filemap=self.filemap) + _ui = ui.ui() + _ui.setconfig('hgsubversion', 'stupid', str(stupid)) + _ui.setconfig('hgsubversion', 'filemap', self.filemap) + commands.clone(_ui, test_util.fileurl(self.repo_path), + self.wc_path, filemap=self.filemap) self.assertEqual(node.hex(self.repo[0].node()), '2c48f3525926ab6c8b8424bcf5eb34b149b61841') self.assertEqual(node.hex(self.repo['default'].node()), 'b37a3c0297b71f989064d9b545b5a478bbed7cc1')