Mercurial > hgsubversion
comparison 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 |
comparison
equal
deleted
inserted
replaced
1355:79e319fe767d | 1356:57d65269d30c |
---|---|
288 repo = self.repo | 288 repo = self.repo |
289 | 289 |
290 for r in repo: | 290 for r in repo: |
291 self.assertEquals(verify.verify(ui, repo, rev=r), 0) | 291 self.assertEquals(verify.verify(ui, repo, rev=r), 0) |
292 | 292 |
293 def test_branchmap_no_replacement(self): | |
294 '''test that empty mappings are accepted | |
295 | |
296 Empty mappings are lines like 'this ='. We check that such branches are | |
297 not converted. | |
298 ''' | |
299 repo_path = self.load_svndump('branchmap.svndump') | |
300 branchmap = open(self.branchmap, 'w') | |
301 branchmap.write("badname =\n") | |
302 branchmap.close() | |
303 ui = self.ui() | |
304 ui.setconfig('hgsubversion', 'branchmap', self.branchmap) | |
305 commands.clone(ui, test_util.fileurl(repo_path), | |
306 self.wc_path, branchmap=self.branchmap) | |
307 branches = set(self.repo[i].branch() for i in self.repo) | |
308 self.assertEquals(sorted(branches), ['default', 'feature']) | |
309 | |
293 def test_tagmap(self): | 310 def test_tagmap(self): |
294 repo_path = self.load_svndump('basic_tag_tests.svndump') | 311 repo_path = self.load_svndump('basic_tag_tests.svndump') |
295 tagmap = open(self.tagmap, 'w') | 312 tagmap = open(self.tagmap, 'w') |
296 tagmap.write("tag_r3 = 3.x # stuffy\n") | 313 tagmap.write("tag_r3 = 3.x # stuffy\n") |
297 tagmap.write("copied_tag = \n") | 314 tagmap.write("copied_tag = \n") |