Mercurial > hgsubversion
comparison tests/test_fetch_mappings.py @ 847:0de18c5c2e35
Respect filemap rule order (rules that come first are overridden by rules that come later)
author | Vitaliy Filippov <vitalif@yourcmc.ru> |
---|---|
date | Sat, 28 Jan 2012 02:18:25 +0400 |
parents | 312b37bc5e20 |
children | 4e203a47102a |
comparison
equal
deleted
inserted
replaced
846:7ca3d1b08d67 | 847:0de18c5c2e35 |
---|---|
129 | 129 |
130 def test_file_map_exclude_stupid(self): | 130 def test_file_map_exclude_stupid(self): |
131 # TODO: re-enable test if we ever reinstate this feature | 131 # TODO: re-enable test if we ever reinstate this feature |
132 self.assertRaises(hgutil.Abort, self.test_file_map_exclude, True) | 132 self.assertRaises(hgutil.Abort, self.test_file_map_exclude, True) |
133 | 133 |
134 def test_file_map_rule_order(self): | |
135 test_util.load_svndump_fixture(self.repo_path, 'replace_trunk_with_branch.svndump') | |
136 filemap = open(self.filemap, 'w') | |
137 filemap.write("exclude alpha\n") | |
138 filemap.write("include .\n") | |
139 filemap.close() | |
140 ui = self.ui(False) | |
141 ui.setconfig('hgsubversion', 'filemap', self.filemap) | |
142 commands.clone(ui, test_util.fileurl(self.repo_path), | |
143 self.wc_path, filemap=self.filemap) | |
144 self.assertEqual(node.hex(self.repo[0].node()), '2cd09772e0f6ddf2d13c60ef3c1be11ad5a7dfae') | |
145 self.assertEqual(node.hex(self.repo['default'].node()), '8a525ca0671f456e6b1417187bf86c6115d2cb78') | |
146 | |
134 def test_branchmap(self, stupid=False): | 147 def test_branchmap(self, stupid=False): |
135 test_util.load_svndump_fixture(self.repo_path, 'branchmap.svndump') | 148 test_util.load_svndump_fixture(self.repo_path, 'branchmap.svndump') |
136 branchmap = open(self.branchmap, 'w') | 149 branchmap = open(self.branchmap, 'w') |
137 branchmap.write("badname = good-name # stuffy\n") | 150 branchmap.write("badname = good-name # stuffy\n") |
138 branchmap.write("feature = default\n") | 151 branchmap.write("feature = default\n") |