comparison tests/test_fetch_mappings.py @ 635:e2c3349b2cca

branchmap: map empty commits in replay mode.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sat, 10 Jul 2010 14:19:24 +0200
parents a400f3bf5611
children d4f433ee709a
comparison
equal deleted inserted replaced
634:a400f3bf5611 635:e2c3349b2cca
132 self.assertEquals(sorted(branches), ['art', 'closeme']) 132 self.assertEquals(sorted(branches), ['art', 'closeme'])
133 133
134 def test_branchmap_tagging_stupid(self): 134 def test_branchmap_tagging_stupid(self):
135 self.test_branchmap_tagging(True) 135 self.test_branchmap_tagging(True)
136 136
137 def test_branchmap_empty_commit(self, stupid=False):
138 '''test mapping an empty commit on a renamed branch'''
139 test_util.load_svndump_fixture(self.repo_path, 'propset-branch.svndump')
140 branchmap = open(self.branchmap, 'w')
141 branchmap.write("the-branch = bob\n")
142 branchmap.close()
143 ui = self.ui(stupid)
144 ui.setconfig('hgsubversion', 'branchmap', self.branchmap)
145 commands.clone(ui, test_util.fileurl(self.repo_path),
146 self.wc_path, branchmap=self.branchmap)
147 branches = set(self.repo[i].branch() for i in self.repo)
148 self.assertEquals(sorted(branches), ['bob', 'default'])
149
150 def test_branchmap_empty_commit_stupid(self):
151 '''test mapping an empty commit on a renamed branch (stupid)'''
152 self.test_branchmap_empty_commit(True)
153
137 def suite(): 154 def suite():
138 return unittest.TestLoader().loadTestsFromTestCase(MapTests) 155 return unittest.TestLoader().loadTestsFromTestCase(MapTests)