comparison tests/test_fetch_branches.py @ 133:2242dd1163c6

hg_delta_editor: fix bad parent revision calculation in the case of a branch recycling a name. Also implemented marking branches as closed in both replay and stupid paths.
author Augie Fackler <durin42@gmail.com>
date Wed, 10 Dec 2008 14:29:05 -0600
parents 4d42dbbb5127
children 22162380c4b9
comparison
equal deleted inserted replaced
132:3a9d6cd18332 133:2242dd1163c6
1 import sys 1 import sys
2 import unittest 2 import unittest
3
4 from mercurial import node
3 5
4 import test_util 6 import test_util
5 7
6 8
7 class TestFetchBranches(test_util.TestBase): 9 class TestFetchBranches(test_util.TestBase):
26 self.assertEqual(0, r.parents()[0].rev()) 28 self.assertEqual(0, r.parents()[0].rev())
27 self.assertEqual(['a', 'c', 'z'], sorted(r.manifest())) 29 self.assertEqual(['a', 'c', 'z'], sorted(r.manifest()))
28 30
29 def test_unorderedbranch_stupid(self): 31 def test_unorderedbranch_stupid(self):
30 self.test_unorderedbranch(True) 32 self.test_unorderedbranch(True)
33
34 def test_renamed_branch_to_trunk(self, stupid=False):
35 repo = self._load_fixture_and_fetch('branch_rename_to_trunk.svndump',
36 stupid)
37 self.assertEqual(node.hex(repo['tip'].node()),
38 'b479347c1f56d1fafe5e32a7ce0d1b7099637784')
39 self.assertEqual(repo['tip'].parents()[0].branch(), 'dev_branch')
40 self.assertEqual(repo['old_trunk'].parents()[0].branch(), 'default')
41
42 def test_renamed_branch_to_trunk_stupid(self):
43 self.test_renamed_branch_to_trunk(stupid=True)
31 44
32 def suite(): 45 def suite():
33 all = [unittest.TestLoader().loadTestsFromTestCase(TestFetchBranches), 46 all = [unittest.TestLoader().loadTestsFromTestCase(TestFetchBranches),
34 ] 47 ]
35 return unittest.TestSuite(all) 48 return unittest.TestSuite(all)