diff 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
line wrap: on
line diff
--- a/tests/test_fetch_branches.py
+++ b/tests/test_fetch_branches.py
@@ -1,6 +1,8 @@
 import sys
 import unittest
 
+from mercurial import node
+
 import test_util
 
 
@@ -28,6 +30,17 @@ class TestFetchBranches(test_util.TestBa
 
     def test_unorderedbranch_stupid(self):
         self.test_unorderedbranch(True)
+        
+    def test_renamed_branch_to_trunk(self, stupid=False):
+        repo = self._load_fixture_and_fetch('branch_rename_to_trunk.svndump', 
+                                            stupid)
+        self.assertEqual(node.hex(repo['tip'].node()),
+                         'b479347c1f56d1fafe5e32a7ce0d1b7099637784')
+        self.assertEqual(repo['tip'].parents()[0].branch(), 'dev_branch')
+        self.assertEqual(repo['old_trunk'].parents()[0].branch(), 'default')
+
+    def test_renamed_branch_to_trunk_stupid(self):
+        self.test_renamed_branch_to_trunk(stupid=True)
 
 def suite():
     all = [unittest.TestLoader().loadTestsFromTestCase(TestFetchBranches),