Mercurial > hgsubversion
annotate tests/test_fetch_branches.py @ 130:c2a84d436202
test_fetch_rename: test content of files coming from the past
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 10 Dec 2008 11:03:22 -0600 |
parents | f508c1fa19a5 |
children | 4d42dbbb5127 |
rev | line source |
---|---|
117
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 import sys |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 import unittest |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
3 |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
4 import test_util |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
5 |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
6 |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
7 class TestFetchBranches(test_util.TestBase): |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
8 def _load_fixture_and_fetch(self, fixture_name, stupid): |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 return test_util.load_fixture_and_fetch(fixture_name, self.repo_path, |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 self.wc_path, stupid=stupid) |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
12 def test_unrelatedbranch(self, stupid=False): |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
13 repo = self._load_fixture_and_fetch('unrelatedbranch.svndump', stupid) |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
14 heads = [repo[n] for n in repo.heads()] |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
15 heads = dict([(ctx.branch(), ctx) for ctx in heads]) |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
16 # Let these tests disabled yet as the fix is not obvious |
120
f508c1fa19a5
hg_delta_editor: do not assume branches are copied from trunk by default
Patrick Mezard <pmezard@gmail.com>
parents:
117
diff
changeset
|
17 self.assertEqual(heads['branch1'].manifest().keys(), ['b']) |
f508c1fa19a5
hg_delta_editor: do not assume branches are copied from trunk by default
Patrick Mezard <pmezard@gmail.com>
parents:
117
diff
changeset
|
18 self.assertEqual(heads['branch2'].manifest().keys(), ['a', 'b']) |
117
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
19 |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
20 def test_unrelatedbranch_stupid(self): |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
21 self.test_unrelatedbranch(True) |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
22 |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
23 def suite(): |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
24 all = [unittest.TestLoader().loadTestsFromTestCase(TestFetchBranches), |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 ] |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
26 return unittest.TestSuite(all) |