# HG changeset patch # User Augie Fackler # Date 1245086779 18000 # Node ID f5222d0216658fc72e3834832e3499e6bb399ba8 # Parent 3ae8edc3d8f15a85d74dc0ac1556a7aa178f5777 tests: fix for new branch heads change in upstream hg. diff --git a/tests/test_fetch_branches.py b/tests/test_fetch_branches.py --- 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): diff --git a/tests/test_tags.py b/tests/test_tags.py --- 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']