Mercurial > hgsubversion
comparison tests/test_single_dir_clone.py @ 1074:2668785264d7
test_single_dir_clone: use stupid mode metaclass
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Fri, 09 Aug 2013 23:46:00 +0200 |
parents | 3092b3c109a8 |
children | 6e1dbf6cbc92 |
comparison
equal
deleted
inserted
replaced
1073:9a740cbb6895 | 1074:2668785264d7 |
---|---|
9 from mercurial import hg | 9 from mercurial import hg |
10 from mercurial import node | 10 from mercurial import node |
11 from mercurial import ui | 11 from mercurial import ui |
12 | 12 |
13 class TestSingleDirClone(test_util.TestBase): | 13 class TestSingleDirClone(test_util.TestBase): |
14 stupid_mode_tests = True | |
15 | |
14 def test_clone_single_dir_simple(self): | 16 def test_clone_single_dir_simple(self): |
15 repo = self._load_fixture_and_fetch('branch_from_tag.svndump', | 17 repo = self._load_fixture_and_fetch('branch_from_tag.svndump', |
16 stupid=False, | |
17 layout='single', | 18 layout='single', |
18 subdir='') | 19 subdir='') |
19 self.assertEqual(repo.branchtags().keys(), ['default']) | 20 self.assertEqual(repo.branchtags().keys(), ['default']) |
20 self.assertEqual(repo['tip'].manifest().keys(), | 21 self.assertEqual(repo['tip'].manifest().keys(), |
21 ['trunk/beta', | 22 ['trunk/beta', |
27 'tags/tag_r3/beta', | 28 'tags/tag_r3/beta', |
28 'branches/branch_from_tag/beta']) | 29 'branches/branch_from_tag/beta']) |
29 | 30 |
30 def test_auto_detect_single(self): | 31 def test_auto_detect_single(self): |
31 repo = self._load_fixture_and_fetch('branch_from_tag.svndump', | 32 repo = self._load_fixture_and_fetch('branch_from_tag.svndump', |
32 stupid=False, | |
33 layout='auto') | 33 layout='auto') |
34 self.assertEqual(repo.branchtags().keys(), ['default', | 34 self.assertEqual(repo.branchtags().keys(), ['default', |
35 'branch_from_tag']) | 35 'branch_from_tag']) |
36 oldmanifest = test_util.filtermanifest(repo['default'].manifest().keys()) | 36 oldmanifest = test_util.filtermanifest(repo['default'].manifest().keys()) |
37 # remove standard layout | 37 # remove standard layout |
38 shutil.rmtree(self.wc_path) | 38 shutil.rmtree(self.wc_path) |
39 # try again with subdir to get single dir clone | 39 # try again with subdir to get single dir clone |
40 repo = self._load_fixture_and_fetch('branch_from_tag.svndump', | 40 repo = self._load_fixture_and_fetch('branch_from_tag.svndump', |
41 stupid=False, | |
42 layout='auto', | 41 layout='auto', |
43 subdir='trunk') | 42 subdir='trunk') |
44 self.assertEqual(repo.branchtags().keys(), ['default', ]) | 43 self.assertEqual(repo.branchtags().keys(), ['default', ]) |
45 self.assertEqual(repo['default'].manifest().keys(), oldmanifest) | 44 self.assertEqual(repo['default'].manifest().keys(), oldmanifest) |
46 | 45 |
47 def test_clone_subdir_is_file_prefix(self, stupid=False): | 46 def test_clone_subdir_is_file_prefix(self): |
48 FIXTURE = 'subdir_is_file_prefix.svndump' | 47 FIXTURE = 'subdir_is_file_prefix.svndump' |
49 repo = self._load_fixture_and_fetch(FIXTURE, | 48 repo = self._load_fixture_and_fetch(FIXTURE, |
50 stupid=stupid, | |
51 layout='single', | 49 layout='single', |
52 subdir=test_util.subdir[FIXTURE]) | 50 subdir=test_util.subdir[FIXTURE]) |
53 self.assertEqual(repo.branchtags().keys(), ['default']) | 51 self.assertEqual(repo.branchtags().keys(), ['default']) |
54 self.assertEqual(repo['tip'].manifest().keys(), ['flaf.txt']) | 52 self.assertEqual(repo['tip'].manifest().keys(), ['flaf.txt']) |
55 | 53 |
56 def test_externals_single(self): | 54 def test_externals_single(self): |
57 repo = self._load_fixture_and_fetch('externals.svndump', | 55 repo = self._load_fixture_and_fetch('externals.svndump', |
58 stupid=False, | |
59 layout='single') | 56 layout='single') |
60 for rev in repo: | 57 for rev in repo: |
61 assert '.hgsvnexternals' not in repo[rev].manifest() | 58 assert '.hgsvnexternals' not in repo[rev].manifest() |
62 return # TODO enable test when externals in single are fixed | 59 return # TODO enable test when externals in single are fixed |
63 expect = """[.] | 60 expect = """[.] |
72 | 69 |
73 def test_externals_single_whole_repo(self): | 70 def test_externals_single_whole_repo(self): |
74 # This is the test which demonstrates the brokenness of externals | 71 # This is the test which demonstrates the brokenness of externals |
75 return # TODO enable test when externals in single are fixed | 72 return # TODO enable test when externals in single are fixed |
76 repo = self._load_fixture_and_fetch('externals.svndump', | 73 repo = self._load_fixture_and_fetch('externals.svndump', |
77 stupid=False, | |
78 layout='single', | 74 layout='single', |
79 subdir='') | 75 subdir='') |
80 for rev in repo: | 76 for rev in repo: |
81 rc = repo[rev] | 77 rc = repo[rev] |
82 if '.hgsvnexternals' in rc: | 78 if '.hgsvnexternals' in rc: |