Mercurial > hgsubversion
comparison tests/test_fetch_command.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 | f9014e28721b |
children | 9c3b4f59e7e6 |
comparison
equal
deleted
inserted
replaced
949:297e2b4a6e2c | 950:a80b01ceb1fc |
---|---|
93 self.assertEqual(node.hex(repo['default'].node()), | 93 self.assertEqual(node.hex(repo['default'].node()), |
94 '434ed487136c1b47c1e8f952edb4dc5a8e6328df') | 94 '434ed487136c1b47c1e8f952edb4dc5a8e6328df') |
95 assert 'README' not in repo | 95 assert 'README' not in repo |
96 assert '../branches' not in repo | 96 assert '../branches' not in repo |
97 | 97 |
98 def test_files_copied_from_outside_btt(self): | 98 def test_files_copied_from_outside_btt(self, stupid=False): |
99 repo = self._load_fixture_and_fetch( | 99 repo = self._load_fixture_and_fetch( |
100 'test_files_copied_from_outside_btt.svndump') | 100 'test_files_copied_from_outside_btt.svndump', stupid=stupid) |
101 self.assertEqual(node.hex(repo['tip'].node()), | 101 self.assertEqual(node.hex(repo['tip'].node()), |
102 '3c78170e30ddd35f2c32faa0d8646ab75bba4f73') | 102 '3c78170e30ddd35f2c32faa0d8646ab75bba4f73') |
103 self.assertEqual(len(repo.changelog), 2) | 103 self.assertEqual(len(repo.changelog), 2) |
104 | |
105 def test_files_copied_from_outside_btt_stupid(self): | |
106 self.test_files_copied_from_outside_btt(stupid=True) | |
104 | 107 |
105 def test_file_renamed_in_from_outside_btt(self): | 108 def test_file_renamed_in_from_outside_btt(self): |
106 repo = self._load_fixture_and_fetch( | 109 repo = self._load_fixture_and_fetch( |
107 'file_renamed_in_from_outside_btt.svndump') | 110 'file_renamed_in_from_outside_btt.svndump') |
108 self.assert_('LICENSE.file' in repo['default']) | 111 self.assert_('LICENSE.file' in repo['default']) |