comparison tests/test_fetch_branches.py @ 950:a80b01ceb1fc

editor: relax copyfrom dir checks to avoid extra missing entries When renaming a branch you get something like: D /branch/bar A /branch/foo (from /branch/foo:42) Unfortunately, the branch layout for the revision being converted is computed before starting to convert it. It means the copyfrom path supplied in the add_directory() for /branch/foo will be be considered invalid, be added to missing and fetched the slow way despite being in the repository history. Avoid that by checking the path looks like a branch path and matching it with the filemap. It will be resolved afterwards anyway.
author Patrick Mezard <patrick@mezard.eu>
date Sat, 06 Oct 2012 10:10:35 +0200
parents 20e73b5ab6f7
children 3df6ed4e7561
comparison
equal deleted inserted replaced
949:297e2b4a6e2c 950:a80b01ceb1fc
56 56
57 def test_unorderedbranch_stupid(self): 57 def test_unorderedbranch_stupid(self):
58 self.test_unorderedbranch(True) 58 self.test_unorderedbranch(True)
59 59
60 def test_renamed_branch_to_trunk(self, stupid=False): 60 def test_renamed_branch_to_trunk(self, stupid=False):
61 config = {'hgsubversion.failonmissing': 'true'}
61 repo = self._load_fixture_and_fetch('branch_rename_to_trunk.svndump', 62 repo = self._load_fixture_and_fetch('branch_rename_to_trunk.svndump',
62 stupid=stupid) 63 stupid=stupid, config=config)
63 self.assertEqual(repo['default'].parents()[0].branch(), 'dev_branch') 64 self.assertEqual(repo['default'].parents()[0].branch(), 'dev_branch')
64 self.assert_('iota' in repo['default']) 65 self.assert_('iota' in repo['default'])
65 self.assertEqual(repo['old_trunk'].parents()[0].branch(), 'default') 66 self.assertEqual(repo['old_trunk'].parents()[0].branch(), 'default')
66 self.assert_('iota' not in repo['old_trunk']) 67 self.assert_('iota' not in repo['old_trunk'])
67 expected = ['default', 'old_trunk'] 68 expected = ['default', 'old_trunk']