Mercurial > hgsubversion
comparison tests/test_tags.py @ 37:2d319e162598
Add a test that proves renaming a branch to make a tag works properly.
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Mon, 20 Oct 2008 16:39:53 -0500 |
| parents | 9c481cae0428 |
| children | 072010a271c6 |
comparison
equal
deleted
inserted
replaced
| 36:c4523e651325 | 37:2d319e162598 |
|---|---|
| 80 self.assertEqual(repo['branch_from_tag'].parents()[0].node(), | 80 self.assertEqual(repo['branch_from_tag'].parents()[0].node(), |
| 81 repo['tag/copied_tag'].node()) | 81 repo['tag/copied_tag'].node()) |
| 82 | 82 |
| 83 def test_branch_from_tag_stupid(self): | 83 def test_branch_from_tag_stupid(self): |
| 84 self.test_branch_from_tag(stupid=True) | 84 self.test_branch_from_tag(stupid=True) |
| 85 | |
| 86 def test_tag_by_renaming_branch(self, stupid=False): | |
| 87 repo = self._load_fixture_and_fetch('tag_by_rename_branch.svndump', | |
| 88 stupid=stupid) | |
| 89 svncommand.generate_hg_tags(ui.ui(), self.wc_path) | |
| 90 repo = hg.repository(ui.ui(), self.wc_path) | |
| 91 self.assertEqual(node.hex(repo['tip'].node()), | |
| 92 '1b941f92acc343939274bd8bbf25984fa9706bb9') | |
| 93 self.assertEqual(node.hex(repo['tag/dummy'].node()), | |
| 94 '68f5f7d82b00a2efe3aca28b615ebab98235d55f') | |
| 95 | |
| 96 def test_tag_by_renaming_branch_stupid(self): | |
| 97 self.test_tag_by_renaming_branch(stupid=True) | |
| 85 | 98 |
| 86 def suite(): | 99 def suite(): |
| 87 return unittest.TestLoader().loadTestsFromTestCase(TestTags) | 100 return unittest.TestLoader().loadTestsFromTestCase(TestTags) |
