/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_branch.py

Add HPSS acceptance test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    branch,
24
24
    bzrdir,
25
25
    errors,
26
 
    repository,
27
26
    revision as _mod_revision,
28
27
    )
29
28
from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1
30
29
from bzrlib.tests import TestCaseWithTransport
31
30
from bzrlib.tests import (
32
 
    KnownFailure,
33
31
    HardlinkFeature,
34
32
    test_server,
35
33
    )
465
463
        # upwards without agreement from bzr's network support maintainers.
466
464
        self.assertLength(14, self.hpss_calls)
467
465
 
 
466
    def test_branch_from_branch_with_tags(self):
 
467
        self.setup_smart_server_with_call_log()
 
468
        builder = self.make_branch_builder('source')
 
469
        builder.build_commit(message="Rev 1", rev_id='rev-1')
 
470
        builder.build_commit(message="Rev 2", rev_id='rev-2')
 
471
        source = builder.get_branch()
 
472
        source.tags.set_tag('tag-a', 'rev-2')
 
473
        source.tags.set_tag('tag-missing', 'missing-rev')
 
474
        source.set_last_revision_info(1, 'rev-1')
 
475
        # Now source has a tag not in its ancestry.  Make a branch from it.
 
476
        self.reset_smart_call_log()
 
477
        out, err = self.run_bzr(['branch', self.get_url('source'), 'target'])
 
478
        # This figure represent the amount of work to perform this use case. It
 
479
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
480
        # being too low. If rpc_count increases, more network roundtrips have
 
481
        # become necessary for this use case. Please do not adjust this number
 
482
        # upwards without agreement from bzr's network support maintainers.
 
483
        self.assertLength(9, self.hpss_calls)
 
484
 
468
485
 
469
486
class TestRemoteBranch(TestCaseWithSFTPServer):
470
487