~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository/test_fetch.py

  • Committer: Martin Packman
  • Date: 2012-01-05 09:50:04 UTC
  • mfrom: (6424 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6426.
  • Revision ID: martin.packman@canonical.com-20120105095004-mia9xb7y0efmto0v
Merge bzr.dev to resolve conflicts in bzrlib.builtins

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    gpg,
23
23
    remote,
24
24
    repository,
25
 
    tests,
26
25
    )
27
26
from bzrlib.inventory import ROOT_ID
28
27
from bzrlib.tests import (
157
156
 
158
157
    def test_fetch_to_rich_root_set_parent_1_ghost_parent(self):
159
158
        # 1 ghost parent -> No parents
 
159
        if not self.repository_format.supports_ghosts:
 
160
            raise TestNotApplicable("repository format does not support "
 
161
                 "ghosts")
160
162
        self.do_test_fetch_to_rich_root_sets_parents_correctly((),
161
163
            [('tip', ['ghost'], [('add', ('', ROOT_ID, 'directory', ''))]),
162
164
            ], allow_lefthand_ghost=True)
333
335
    def test_fetch_into_smart_with_ghost(self):
334
336
        trans = self.make_smart_server('target')
335
337
        source_b = self.make_simple_branch_with_ghost()
 
338
        if not source_b.bzrdir._format.supports_transport(trans):
 
339
            raise TestNotApplicable("format does not support transport")
336
340
        target = self.make_repository('target')
337
341
        # Re-open the repository over the smart protocol
338
342
        target = repository.Repository.open(trans.base)
350
354
    def test_fetch_from_smart_with_ghost(self):
351
355
        trans = self.make_smart_server('source')
352
356
        source_b = self.make_simple_branch_with_ghost()
 
357
        if not source_b.bzrdir._format.supports_transport(trans):
 
358
            raise TestNotApplicable("format does not support transport")
353
359
        target = self.make_repository('target')
354
360
        target.lock_write()
355
361
        self.addCleanup(target.unlock)