comparison tests/test_fetch_mappings.py @ 203:907c160c6289

Refactor branch handling to be much more dynamic (and hopefully robust). This should allow fixing of several outstanding issues with branch handling. Note that this is a *massive* change to one of the oldest parts of hgsubversion, so it might introduce bugs not caught by the testsuite.
author Augie Fackler <durin42@gmail.com>
date Mon, 02 Mar 2009 23:58:38 -0600
parents a336e3e82648
children 4950b18cf949
comparison
equal deleted inserted replaced
202:125cf3cb7bee 203:907c160c6289
51 self.assertEqual(self.repo['tip'].user(), 51 self.assertEqual(self.repo['tip'].user(),
52 'Testy <test@test>') 52 'Testy <test@test>')
53 53
54 def test_author_map_closing_author_stupid(self): 54 def test_author_map_closing_author_stupid(self):
55 self.test_author_map_closing_author(True) 55 self.test_author_map_closing_author(True)
56 56
57 def test_file_map(self, stupid=False): 57 def test_file_map(self, stupid=False):
58 test_util.load_svndump_fixture(self.repo_path, 'replace_trunk_with_branch.svndump') 58 test_util.load_svndump_fixture(self.repo_path, 'replace_trunk_with_branch.svndump')
59 filemap = open(self.filemap, 'w') 59 filemap = open(self.filemap, 'w')
60 filemap.write("include alpha\n") 60 filemap.write("include alpha\n")
61 filemap.close() 61 filemap.close()
64 hg_repo_path=self.wc_path, 64 hg_repo_path=self.wc_path,
65 stupid=stupid, 65 stupid=stupid,
66 filemap=self.filemap) 66 filemap=self.filemap)
67 self.assertEqual(node.hex(self.repo[0].node()), '88e2c7492d83e4bf30fbb2dcbf6aa24d60ac688d') 67 self.assertEqual(node.hex(self.repo[0].node()), '88e2c7492d83e4bf30fbb2dcbf6aa24d60ac688d')
68 self.assertEqual(node.hex(self.repo['default'].node()), 'e524296152246b3837fe9503c83b727075835155') 68 self.assertEqual(node.hex(self.repo['default'].node()), 'e524296152246b3837fe9503c83b727075835155')
69 69
70 def test_file_map_stupid(self): 70 def test_file_map_stupid(self):
71 self.test_file_map(True) 71 self.test_file_map(True)
72 72
73 def test_file_map_exclude(self, stupid=False): 73 def test_file_map_exclude(self, stupid=False):
74 test_util.load_svndump_fixture(self.repo_path, 'replace_trunk_with_branch.svndump') 74 test_util.load_svndump_fixture(self.repo_path, 'replace_trunk_with_branch.svndump')
75 filemap = open(self.filemap, 'w') 75 filemap = open(self.filemap, 'w')
76 filemap.write("exclude alpha\n") 76 filemap.write("exclude alpha\n")
77 filemap.close() 77 filemap.close()
79 svn_url=test_util.fileurl(self.repo_path), 79 svn_url=test_util.fileurl(self.repo_path),
80 hg_repo_path=self.wc_path, 80 hg_repo_path=self.wc_path,
81 stupid=stupid, 81 stupid=stupid,
82 filemap=self.filemap) 82 filemap=self.filemap)
83 self.assertEqual(node.hex(self.repo[0].node()), '2c48f3525926ab6c8b8424bcf5eb34b149b61841') 83 self.assertEqual(node.hex(self.repo[0].node()), '2c48f3525926ab6c8b8424bcf5eb34b149b61841')
84 self.assertEqual(node.hex(self.repo['default'].node()), '86fc12d173716139d5bd1d36866038d355009f45') 84 self.assertEqual(node.hex(self.repo['default'].node()), 'b37a3c0297b71f989064d9b545b5a478bbed7cc1')
85 85
86 def test_file_map_exclude_stupid(self): 86 def test_file_map_exclude_stupid(self):
87 self.test_file_map_exclude(True) 87 self.test_file_map_exclude(True)
88 88
89 89
90 def suite(): 90 def suite():