예제 #1
0
 def _qbrz_run(self):
     # Remove svn checkout support
     try:
         from breezy.plugins.svn.format import SvnWorkingTreeDirFormat
     except ImportError:
         pass
     else:
         from breezy.controldir import ControlDirFormat, format_registry
         ControlDirFormat.unregister_control_format(SvnWorkingTreeDirFormat)
         format_registry.remove('subversion-wc')
     # Start QBzr
     window = QBzrMainWindow()
     window.setDirectory(osutils.realpath(CUR_DIR))
     window.show()
     self._application.exec_()
예제 #2
0
파일: __init__.py 프로젝트: zeta1999/breezy
def load_tests(loader, standard_tests, pattern):
    test_per_controldir = [
        'breezy.tests.per_controldir.test_controldir',
        'breezy.tests.per_controldir.test_format',
        'breezy.tests.per_controldir.test_push',
    ]
    submod_tests = loader.loadTestsFromModuleNames(test_per_controldir)
    formats = ControlDirFormat.known_formats()
    scenarios = make_scenarios(
        default_transport,
        None,
        # None here will cause a readonly decorator to be created
        # by the TestCaseWithTransport.get_readonly_transport method.
        None,
        formats)
    # This will always add scenarios using the smart server.
    from breezy.bzr.remote import RemoteBzrDirFormat
    # test the remote server behaviour when backed with a MemoryTransport
    # Once for the current version
    scenarios.extend(
        make_scenarios(memory.MemoryServer,
                       test_server.SmartTCPServer_for_testing,
                       test_server.ReadonlySmartTCPServer_for_testing,
                       [(RemoteBzrDirFormat())],
                       name_suffix='-default'))
    # And once with < 1.6 - the 'v2' protocol.
    scenarios.extend(
        make_scenarios(memory.MemoryServer,
                       test_server.SmartTCPServer_for_testing_v2_only,
                       test_server.ReadonlySmartTCPServer_for_testing_v2_only,
                       [(RemoteBzrDirFormat())],
                       name_suffix='-v2'))
    # add the tests for the sub modules
    return multiply_tests(submod_tests, scenarios, standard_tests)
예제 #3
0
def select_preferred_probers(vcs_type: Optional[str] = None) -> List[Prober]:
    probers = list(ControlDirFormat.all_probers())
    if vcs_type:
        try:
            probers.insert(0, prober_registry[vcs_type.lower()])
        except KeyError:
            pass
    return probers
예제 #4
0
파일: __init__.py 프로젝트: zeta1999/breezy
def load_tests(loader, standard_tests, pattern):
    colo_supported_formats = []
    colo_unsupported_formats = []
    # This will always add scenarios using the smart server.
    from breezy.bzr.remote import RemoteBzrDirFormat
    for format in ControlDirFormat.known_formats():
        if isinstance(format, RemoteBzrDirFormat):
            continue
        if format.colocated_branches:
            colo_supported_formats.append(format)
        else:
            colo_unsupported_formats.append(format)
    supported_scenarios = make_scenarios(default_transport, None, None,
                                         colo_supported_formats)
    unsupported_scenarios = make_scenarios(default_transport, None, None,
                                           colo_unsupported_formats)
    # test the remote server behaviour when backed with a MemoryTransport
    # Once for the current version
    unsupported_scenarios.extend(
        make_scenarios(memory.MemoryServer,
                       test_server.SmartTCPServer_for_testing,
                       test_server.ReadonlySmartTCPServer_for_testing,
                       [(RemoteBzrDirFormat())],
                       name_suffix='-default'))
    # And once with < 1.6 - the 'v2' protocol.
    unsupported_scenarios.extend(
        make_scenarios(memory.MemoryServer,
                       test_server.SmartTCPServer_for_testing_v2_only,
                       test_server.ReadonlySmartTCPServer_for_testing_v2_only,
                       [(RemoteBzrDirFormat())],
                       name_suffix='-v2'))

    result = loader.suiteClass()
    supported_tests = loader.loadTestsFromModuleNames(
        ['breezy.tests.per_controldir_colo.test_supported'])
    unsupported_tests = loader.loadTestsFromModuleNames(
        ['breezy.tests.per_controldir_colo.test_unsupported'])
    multiply_tests(supported_tests, supported_scenarios, result)
    multiply_tests(unsupported_tests, unsupported_scenarios, result)
    return result
예제 #5
0
 def __init__(self, format):
     self.format = format
     if self.format is None:
         self.format = ControlDirFormat.get_default_format()
예제 #6
0
            raise errors.NotBranchError(path=transport.base)
        except hg_errors.Abort, e:
            trace.mutter('not a hg branch: %s', e)
            raise errors.NotBranchError(path=transport.base)
        except urllib2.HTTPError, e:
            trace.mutter('not a hg branch: %s', e)
            raise errors.NotBranchError(path=transport.base)
        return format

    @classmethod
    def known_formats(cls):
        from breezy.plugins.hg.dir import HgControlDirFormat
        return [HgControlDirFormat()]


ControlDirFormat.register_prober(HgProber)
ControlDirFormat._server_probers.insert(0, HgProber)

controldir_network_format_registry.register_lazy("hg", "breezy.plugins.hg.dir",
                                                 "HgControlDirFormat")

breezy.controldir.format_registry.register_lazy("hg",
                                                "breezy.plugins.hg.dir",
                                                "HgControlDirFormat",
                                                "Mercurial repository. ",
                                                native=False,
                                                hidden=False)

from breezy.repository import (
    format_registry as repository_format_registry,
    network_format_registry as repository_network_format_registry,
예제 #7
0
register_transport_proto(
    'svn+ssh://',
    help="Access using the Subversion smart server tunneled over SSH.")
register_transport_proto('svn+http://')
register_transport_proto('svn+https://')
register_transport_proto('svn://',
                         help="Access using the Subversion smart server.")
register_lazy_transport('svn://', __name__ + '.transport', 'SvnRaTransport')
register_lazy_transport('svn+', __name__ + '.transport', 'SvnRaTransport')

#BzrDirFormat.register_control_server_format(format.SvnRemoteFormat)
# Register as the first control server format, since the default smart
# server implementation tries to do a POST request against .bzr/smart and
# this causes some Subversion servers to reply with 401 Authentication required
# even though they are accessible without authentication.
ControlDirFormat.register_prober(SvnWorkingTreeProber)
ControlDirFormat._server_probers.insert(0, SvnRemoteProber)

network_format_registry.register_lazy("svn-wc", __name__ + '.workingtree',
                                      'SvnWorkingTreeDirFormat')
network_format_registry.register_lazy("subversion", __name__ + '.remote',
                                      'SvnRemoteFormat')
branch_format_registry.register_extra_lazy(__name__ + '.branch',
                                           'SvnBranchFormat')
from breezy.workingtree import (
    format_registry as workingtree_format_registry, )
workingtree_format_registry.register_extra_lazy(__name__ + '.workingtree',
                                                'SvnWorkingTreeFormat')
branch_network_format_registry.register_lazy("subversion",
                                             __name__ + '.branch',
                                             'SvnBranchFormat')