comparison tests/test_tags.py @ 1103:6e1dbf6cbc92

compathacks: new module to collect hacks to work around hg internals changing This includes branchset(), which provides a portable way to get the set of branches present in a repository.
author Augie Fackler <raf@durin42.com>
date Mon, 03 Feb 2014 01:55:56 -0500
parents 58b2d84df5e7
children f06bb42bd2b2
comparison
equal deleted inserted replaced
1102:7635d30effa7 1103:6e1dbf6cbc92
6 from mercurial import commands 6 from mercurial import commands
7 from mercurial import hg 7 from mercurial import hg
8 from mercurial import node 8 from mercurial import node
9 from mercurial import ui 9 from mercurial import ui
10 10
11 from hgsubversion import compathacks
11 from hgsubversion import svncommands 12 from hgsubversion import svncommands
12 from hgsubversion import svnrepo 13 from hgsubversion import svnrepo
13 14
14 class TestTags(test_util.TestBase): 15 class TestTags(test_util.TestBase):
15 stupid_mode_tests = True 16 stupid_mode_tests = True
45 """ 46 """
46 self._test_tags('rename_tag_test.svndump', expected) 47 self._test_tags('rename_tag_test.svndump', expected)
47 48
48 def test_branch_from_tag(self): 49 def test_branch_from_tag(self):
49 repo = self._load_fixture_and_fetch('branch_from_tag.svndump') 50 repo = self._load_fixture_and_fetch('branch_from_tag.svndump')
50 self.assert_('branch_from_tag' in repo.branchtags()) 51 self.assert_('branch_from_tag' in compathacks.branchset(repo))
51 self.assertEqual(repo[1], repo['tag_r3']) 52 self.assertEqual(repo[1], repo['tag_r3'])
52 self.assertEqual(repo['branch_from_tag'].parents()[0], repo['copied_tag']) 53 self.assertEqual(repo['branch_from_tag'].parents()[0], repo['copied_tag'])
53 54
54 def test_tag_by_renaming_branch(self): 55 def test_tag_by_renaming_branch(self):
55 repo = self._load_fixture_and_fetch('tag_by_rename_branch.svndump') 56 repo = self._load_fixture_and_fetch('tag_by_rename_branch.svndump')