Mercurial > hgsubversion
diff tests/test_fetch_mappings.py @ 1356:57d65269d30c
maps: allow an empty map to not convert specific branches
The test, test_fetch_mappings, has been updated as well.
author | Sean Farley <sean@farley.io> |
---|---|
date | Mon, 24 Mar 2014 11:20:57 -0500 |
parents | 77bd24841a5f |
children | a17d8874a099 |
line wrap: on
line diff
--- a/tests/test_fetch_mappings.py +++ b/tests/test_fetch_mappings.py @@ -290,6 +290,23 @@ class MapTests(test_util.TestBase): for r in repo: self.assertEquals(verify.verify(ui, repo, rev=r), 0) + def test_branchmap_no_replacement(self): + '''test that empty mappings are accepted + + Empty mappings are lines like 'this ='. We check that such branches are + not converted. + ''' + repo_path = self.load_svndump('branchmap.svndump') + branchmap = open(self.branchmap, 'w') + branchmap.write("badname =\n") + branchmap.close() + ui = self.ui() + ui.setconfig('hgsubversion', 'branchmap', self.branchmap) + commands.clone(ui, test_util.fileurl(repo_path), + self.wc_path, branchmap=self.branchmap) + branches = set(self.repo[i].branch() for i in self.repo) + self.assertEquals(sorted(branches), ['default', 'feature']) + def test_tagmap(self): repo_path = self.load_svndump('basic_tag_tests.svndump') tagmap = open(self.tagmap, 'w')