1 |
pva 09/06/05 19:47:08 |
2 |
|
3 |
Added: bzrtools-1.15.0-test_fetch_ghosts.patch |
4 |
Log: |
5 |
Version bump. |
6 |
(Portage version: 2.2_rc33/cvs/Linux i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-util/bzrtools/files/bzrtools-1.15.0-test_fetch_ghosts.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/bzrtools/files/bzrtools-1.15.0-test_fetch_ghosts.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/bzrtools/files/bzrtools-1.15.0-test_fetch_ghosts.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: bzrtools-1.15.0-test_fetch_ghosts.patch |
15 |
=================================================================== |
16 |
=== added file 'tests/test_fetch_ghosts.py' |
17 |
--- tests/test_fetch_ghosts.py 1970-01-01 00:00:00 +0000 |
18 |
+++ tests/test_fetch_ghosts.py 2009-06-02 11:33:28 +0000 |
19 |
@@ -0,0 +1,25 @@ |
20 |
+from bzrlib.plugins.bzrtools.fetch_ghosts import GhostFetcher |
21 |
+from bzrlib.tests import TestCaseWithTransport |
22 |
+ |
23 |
+ |
24 |
+class TestFetchGhosts(TestCaseWithTransport): |
25 |
+ |
26 |
+ def prepare_with_ghosts(self): |
27 |
+ tree = self.make_branch_and_tree('.') |
28 |
+ tree.commit('rev1', rev_id='rev1-id') |
29 |
+ tree.set_parent_ids(['rev1-id', 'ghost-id']) |
30 |
+ tree.commit('rev2') |
31 |
+ return tree |
32 |
+ |
33 |
+ def test_fetch_ghosts_failure(self): |
34 |
+ tree = self.prepare_with_ghosts() |
35 |
+ branch = self.make_branch('branch') |
36 |
+ GhostFetcher(tree.branch, branch).run() |
37 |
+ self.assertFalse(tree.branch.repository.has_revision('ghost-id')) |
38 |
+ |
39 |
+ def test_fetch_ghosts_success(self): |
40 |
+ tree = self.prepare_with_ghosts() |
41 |
+ ghost_tree = self.make_branch_and_tree('ghost_tree') |
42 |
+ ghost_tree.commit('ghost', rev_id='ghost-id') |
43 |
+ GhostFetcher(tree.branch, ghost_tree.branch).run() |
44 |
+ self.assertTrue(tree.branch.repository.has_revision('ghost-id')) |