changeset 425:f5222d021665

tests: fix for new branch heads change in upstream hg.
author Augie Fackler <durin42@gmail.com>
date Mon, 15 Jun 2009 12:26:19 -0500
parents 3ae8edc3d8f1
children 72e63999722f
files tests/test_fetch_branches.py tests/test_tags.py
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_fetch_branches.py
+++ b/tests/test_fetch_branches.py
@@ -22,9 +22,9 @@ class TestFetchBranches(test_util.TestBa
         return hg.repository(ui.ui(), self.wc_path)
 
     def openbranches(self, repo):
-        hctxs = [repo[hn] for hn in repo.heads(closed=False)]
-        branches = set(ctx.branch() for ctx in hctxs)
-        branches.discard('closed-branches')
+        hctxs = [repo[hn] for hn in repo.heads()]
+        branches = set(ctx.branch() for ctx in hctxs if
+                       ctx.extra().get('close', None) != '1')
         return sorted(branches)
 
     def test_unrelatedbranch(self, stupid=False):
--- a/tests/test_tags.py
+++ b/tests/test_tags.py
@@ -54,7 +54,7 @@ class TestTags(test_util.TestBase):
     def test_tag_by_renaming_branch(self, stupid=False):
         repo = self._load_fixture_and_fetch('tag_by_rename_branch.svndump',
                                             stupid=stupid)
-        branches = set(repo[h] for h in repo.heads(closed=False))
+        branches = set(repo[h] for h in repo.heads())
         self.assert_('dummy' not in branches)
         self.assertEqual(repo['dummy'], repo['tip'].parents()[0])
         extra = repo['tip'].extra().copy()
@@ -66,7 +66,7 @@ class TestTags(test_util.TestBase):
 
     def test_deletion_of_tag_on_trunk_after_branching(self):
         repo = self._load_fixture_and_fetch('tag_deletion_tag_branch.svndump')
-        branches = set(repo[h].extra()['branch'] for h in repo.heads(closed=False))
+        branches = set(repo[h].extra()['branch'] for h in repo.heads())
         self.assertEqual(branches, set(['default', 'from_2', ]))
         self.assertEqual(
             repo.tags(),
@@ -76,7 +76,7 @@ class TestTags(test_util.TestBase):
     def test_tags_in_unusual_location(self):
         repo = self._load_fixture_and_fetch('unusual_tags.svndump')
         branches = set(repo[h].extra()['branch']
-                       for h in repo.heads(closed=False))
+                       for h in repo.heads())
         self.assertEqual(branches, set(['default', 'dev_branch']))
         tags = repo.tags()
         del tags['tip']
@@ -91,7 +91,7 @@ class TestTags(test_util.TestBase):
         repo = self._load_fixture_and_fetch('tag_name_same_as_branch.svndump')
         self.assertEqual(len(repo.heads()), 1)
         branches = set(repo[h].extra()['branch']
-                       for h in repo.heads(closed=False))
+                       for h in repo.heads())
         self.assertEqual(branches, set(['magic', ]))
         tags = repo.tags()
         del tags['tip']