Mercurial > hgsubversion
diff tests/test_utility_commands.py @ 140:9ffde8662967
util: Add a command to normalize svn urls and use it in a couple of places. Test that it works and prevents failed assertions.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 11 Dec 2008 20:41:57 -0600 |
parents | 89a737852d33 |
children | 04800fda7af5 |
line wrap: on
line diff
--- a/tests/test_utility_commands.py +++ b/tests/test_utility_commands.py @@ -4,7 +4,7 @@ from mercurial import ui from mercurial import hg import utility_commands - +import fetch_command import test_util expected_info_output = '''URL: file://%(repo)s/%(branch)s @@ -48,3 +48,17 @@ class UtilityTests(test_util.TestBase): utility_commands.print_wc_url(u, self.repo, self.wc_path) expected = 'file://%s\n' % urllib.quote(self.repo_path) self.assertEqual(u.stream.getvalue(), expected) + + def test_url_is_normalized(self): + """Verify url gets normalized on initial clone. + """ + test_util.load_svndump_fixture(self.repo_path, 'two_revs.svndump') + fetch_command.fetch_revisions(ui.ui(), + svn_url=test_util.fileurl(self.repo_path)+'/', + hg_repo_path=self.wc_path, + stupid=False) + hg.update(self.repo, 'tip') + u = ui.ui() + utility_commands.print_wc_url(u, self.repo, self.wc_path) + expected = 'file://%s\n' % urllib.quote(self.repo_path) + self.assertEqual(u.stream.getvalue(), expected)