Mercurial > hgsubversion
comparison tests/test_fetch_branches.py @ 344:4dfab1b8b7be
Mention what failed when given a non-numeric revision to clone/pull.
Replace test_branch_tip_update_to_branch_anchor with test_branch_pull_anchor
| author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
|---|---|
| date | Wed, 20 May 2009 21:15:47 +0200 |
| parents | 46e69be8e2c8 |
| children | a62965b179c1 |
comparison
equal
deleted
inserted
replaced
| 343:49e6895ce041 | 344:4dfab1b8b7be |
|---|---|
| 1 import unittest | 1 import unittest |
| 2 | 2 |
| 3 from mercurial import hg | 3 from mercurial import hg |
| 4 from mercurial import node | 4 from mercurial import node |
| 5 from mercurial import ui | 5 from mercurial import ui |
| 6 from mercurial import util as hgutil | |
| 6 | 7 |
| 7 import test_util | 8 import test_util |
| 8 | 9 |
| 9 | 10 |
| 10 class TestFetchBranches(test_util.TestBase): | 11 class TestFetchBranches(test_util.TestBase): |
| 76 self.assertTrue('tip' not in repo[None].tags()) | 77 self.assertTrue('tip' not in repo[None].tags()) |
| 77 | 78 |
| 78 def test_branch_tip_update_to_default_stupid(self): | 79 def test_branch_tip_update_to_default_stupid(self): |
| 79 self.test_branch_tip_update_to_default(True) | 80 self.test_branch_tip_update_to_default(True) |
| 80 | 81 |
| 81 def test_branch_tip_update_to_branch_anchor(self): | 82 def test_branch_pull_anchor(self): |
| 83 self.assertRaises(hgutil.Abort, | |
| 84 self._load_fixture_and_fetch_with_anchor, | |
| 85 'unorderedbranch.svndump', 'NaN') | |
| 82 repo = self._load_fixture_and_fetch_with_anchor( | 86 repo = self._load_fixture_and_fetch_with_anchor( |
| 83 'unorderedbranch.svndump', 'branch') | 87 'unorderedbranch.svndump', '4') |
| 84 self.assertEqual(repo[None].branch(), 'branch') | 88 self.assertTrue('c' not in repo.branchtags()) |
| 85 self.assertEqual(repo[None].parents()[0], repo[repo.branchheads()[0]]) | |
| 86 | 89 |
| 87 def test_branches_weird_moves(self, stupid=False): | 90 def test_branches_weird_moves(self, stupid=False): |
| 88 repo = self._load_fixture_and_fetch('renamedproject.svndump', stupid, | 91 repo = self._load_fixture_and_fetch('renamedproject.svndump', stupid, |
| 89 subdir='project') | 92 subdir='project') |
| 90 heads = [repo[n] for n in repo.heads()] | 93 heads = [repo[n] for n in repo.heads()] |
