from breezy.send import format_registry as send_format_registry send_format_registry.register_lazy('svn', __name__ + '.send', 'send_svn', 'Subversion diff format') from breezy.foreign import ( foreign_vcs_registry, ) foreign_vcs_registry.register_lazy("svn", "breezy.plugins.svn.mapping", "foreign_vcs_svn") from breezy.help_topics import topic_registry topic_registry.register_lazy('svn-layout', __name__ + '.layout', 'help_layout', 'Subversion repository layouts') else: register_lazy("breezy.diff", "format_registry", 'svn', __name__ + '.send', 'SvnDiffTree', help='Subversion diff format') register_lazy("breezy.revisionspec", "revspec_registry", "svn:", "breezy.plugins.svn.revspec", "RevisionSpec_svn") register_lazy("breezy.send", "format_registry", 'svn', __name__ + '.send', 'send_svn', 'Subversion diff format') register_lazy("breezy.foreign", "foreign_vcs_registry", "svn", "breezy.plugins.svn.mapping", "foreign_vcs_svn") register_lazy("breezy.help_topics", "topic_registry", 'svn-layout', __name__ + '.layout', 'help_layout', 'Subversion repository layouts') _mod_bzr_config.option_registry.register_lazy('layout', __name__ + '.config', 'svn_layout_option') _mod_bzr_config.option_registry.register_lazy('guessed-layout',
trace.mutter("bzr-hg: using Mercurial %s" % hg_version) try: from breezy.registry import register_lazy except ImportError: from breezy.foreign import ( foreign_vcs_registry, ) foreign_vcs_registry.register_lazy("hg", "breezy.plugins.hg.mapping", "foreign_hg", "Mercurial") from breezy.send import ( format_registry as send_format_registry, ) send_format_registry.register_lazy('hg', 'breezy.plugins.hg.send', 'send_hg', 'Mecurial bundle format') else: register_lazy("breezy.foreign", "foreign_vcs_registry", "hg", "breezy.plugins.hg.mapping", "foreign_hg", "Mercurial") register_lazy("breezy.send", "format_registry", 'hg', 'breezy.plugins.hg.send', 'send_hg', 'Mecurial bundle format') def has_hg_http_smart_server(transport, external_url): """Check if there is a Mercurial smart server at the remote location. :param transport: Transport to check :param externa_url: External URL for transport :return: Boolean indicating whether transport is backed onto hg """ from breezy.transport.http import Request url = external_url.rstrip("/") + "?pairs=%s-%s&cmd=between" % ("0" * 40, "0" * 40)
return params.to_file.write('Current thread: %s\n' % branch.nick) install_lazy_named_hook('breezy.status', 'hooks', 'post_status', show_loom_summary, 'loom status') try: from breezy.registry import register_lazy except ImportError: # bzr < 2.6 from breezy.revisionspec import revspec_registry revspec_registry.register_lazy('thread:', 'breezy.plugins.loom.revspec', 'RevisionSpecThread') revspec_registry.register_lazy('below:', 'breezy.plugins.loom.revspec', 'RevisionSpecBelow') else: register_lazy("breezy.revisionspec", "revspec_registry", 'thread:', 'breezy.plugins.loom.revspec', 'RevisionSpecThread') register_lazy("breezy.revisionspec", "revspec_registry", 'below:', 'breezy.plugins.loom.revspec', 'RevisionSpecBelow') _LOOM_FORMATS = { b"Bazaar-NG Loom branch format 1\n": "BzrBranchLoomFormat1", b"Bazaar-NG Loom branch format 6\n": "BzrBranchLoomFormat6", b"Bazaar-NG Loom branch format 7\n": "BzrBranchLoomFormat7", } def register_formats(): for format_string, kls in _LOOM_FORMATS.items(): _mod_branch.format_registry.register_lazy(format_string, "breezy.plugins.loom.branch", kls)