comparison tests/test_single_dir_clone.py @ 712:1041fb1bec8c

tests & help: fix compatibility with Mercurial 1.4 and earlier. The --branch option to clone, pull, etc., was introduced in 1.5, and our handling of it assumes that Mercurial also provides it. As a result, both documentation and the test are changed to reflect this.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Wed, 29 Sep 2010 18:04:26 +0200
parents 3b8088de027d
children e698be84c22d
comparison
equal deleted inserted replaced
711:cfc7df19e4dc 712:1041fb1bec8c
211 clean=True) 211 clean=True)
212 self.pushrevisions() 212 self.pushrevisions()
213 self.assertTrue('default' in self.svnls('')) 213 self.assertTrue('default' in self.svnls(''))
214 self.assertEquals(len(self.repo.branchheads('default')), 1) 214 self.assertEquals(len(self.repo.branchheads('default')), 1)
215 215
216 @test_util.requiresoption('branch')
216 def test_push_single_dir_renamed_branch(self, stupid=False): 217 def test_push_single_dir_renamed_branch(self, stupid=False):
217 # Tests pulling and pushing with a renamed branch 218 # Tests pulling and pushing with a renamed branch
218 # Based on test_push_single_dir 219 # Based on test_push_single_dir
219 test_util.load_svndump_fixture(self.repo_path, 220 test_util.load_svndump_fixture(self.repo_path,
220 'branch_from_tag.svndump') 221 'branch_from_tag.svndump')
246 self.assertTrue('adding_file' in self.svnls('')) 247 self.assertTrue('adding_file' in self.svnls(''))
247 248
248 self.assertEquals(set(['flaf']), 249 self.assertEquals(set(['flaf']),
249 set(self.repo[i].branch() for i in self.repo)) 250 set(self.repo[i].branch() for i in self.repo))
250 251
252 @test_util.requiresoption('branch')
251 def test_push_single_dir_renamed_branch_stupid(self): 253 def test_push_single_dir_renamed_branch_stupid(self):
252 self.test_push_single_dir_renamed_branch(True) 254 self.test_push_single_dir_renamed_branch(True)
253 255
254 def suite(): 256 def suite():
255 all = [unittest.TestLoader().loadTestsFromTestCase(TestSingleDir)] 257 all = [unittest.TestLoader().loadTestsFromTestCase(TestSingleDir)]