comparison tests/test_fetch_command.py @ 112:e58c2f1de059

Fix a regression in converting repositories with files copied in from outside branches/tags/trunk where repo root != project root.
author Augie Fackler <durin42@gmail.com>
date Tue, 25 Nov 2008 16:21:57 -0600
parents 5497d1264b4d
children c35f59aa200e
comparison
equal deleted inserted replaced
111:5497d1264b4d 112:e58c2f1de059
6 6
7 import test_util 7 import test_util
8 8
9 9
10 class TestBasicRepoLayout(test_util.TestBase): 10 class TestBasicRepoLayout(test_util.TestBase):
11 def _load_fixture_and_fetch(self, fixture_name): 11 def _load_fixture_and_fetch(self, fixture_name, subdir=''):
12 return test_util.load_fixture_and_fetch(fixture_name, self.repo_path, 12 return test_util.load_fixture_and_fetch(fixture_name, self.repo_path,
13 self.wc_path) 13 self.wc_path, subdir=subdir)
14 14
15 def test_fresh_fetch_single_rev(self): 15 def test_fresh_fetch_single_rev(self):
16 repo = self._load_fixture_and_fetch('single_rev.svndump') 16 repo = self._load_fixture_and_fetch('single_rev.svndump')
17 self.assertEqual(node.hex(repo['tip'].node()), 17 self.assertEqual(node.hex(repo['tip'].node()),
18 'a47d0ce778660a91c31bf2c21c448e9ee296ac90') 18 'a47d0ce778660a91c31bf2c21c448e9ee296ac90')
93 def test_file_renamed_in_from_outside_btt(self): 93 def test_file_renamed_in_from_outside_btt(self):
94 repo = self._load_fixture_and_fetch( 94 repo = self._load_fixture_and_fetch(
95 'file_renamed_in_from_outside_btt.svndump') 95 'file_renamed_in_from_outside_btt.svndump')
96 self.assert_('LICENSE.file' in repo['tip']) 96 self.assert_('LICENSE.file' in repo['tip'])
97 97
98 def test_renamed_dir_in_from_outside_btt_not_repo_root(self):
99 repo = self._load_fixture_and_fetch(
100 'fetch_missing_files_subdir.svndump', subdir='foo')
101 self.assertEqual(node.hex(repo['tip'].node()),
102 '2fae2544a5858d0bc6c04976683b3dcc0416d6e3')
103 self.assert_('bar/alpha' in repo['tip'])
104 self.assert_('foo' in repo['tip'])
105 self.assert_('bar/alpha' not in repo['tip'].parents()[0])
106 self.assert_('foo' in repo['tip'].parents()[0])
107
98 def test_oldest_not_trunk_and_tag_vendor_branch(self): 108 def test_oldest_not_trunk_and_tag_vendor_branch(self):
99 repo = self._load_fixture_and_fetch( 109 repo = self._load_fixture_and_fetch(
100 'tagged_vendor_and_oldest_not_trunk.svndump') 110 'tagged_vendor_and_oldest_not_trunk.svndump')
101 self.assertEqual(node.hex(repo['oldest'].node()), 111 self.assertEqual(node.hex(repo['oldest'].node()),
102 'd73002bcdeffe389a8df81ee43303d36e79e8ca4') 112 'd73002bcdeffe389a8df81ee43303d36e79e8ca4')