/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 breezy/git/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2018-06-14 17:59:16 UTC
  • mto: This revision was merged to the branch mainline in revision 7065.
  • Revision ID: jelmer@jelmer.uk-20180614175916-a2e2xh5k533guq1x
Move breezy.plugins.git to breezy.git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
from breezy.i18n import gettext
33
33
 
34
 
from ... import (
 
34
from .. import (
35
35
    __version__ as breezy_version,
36
36
    errors as bzr_errors,
37
37
    trace,
38
38
    version_info,
39
39
    )
40
40
 
41
 
from ...controldir import (
 
41
from ..controldir import (
42
42
    ControlDirFormat,
43
43
    Prober,
44
44
    format_registry,
45
45
    network_format_registry as controldir_network_format_registry,
46
46
    )
47
47
 
48
 
from ...transport import (
 
48
from ..transport import (
49
49
    register_lazy_transport,
50
50
    register_transport_proto,
51
51
    transport_server_registry,
52
52
    )
53
 
from ...commands import (
 
53
from ..commands import (
54
54
    plugin_cmds,
55
55
    )
56
56
 
93
93
    experimental=False,
94
94
    )
95
95
 
96
 
from ...revisionspec import (RevisionSpec_dwim, revspec_registry)
 
96
from ..revisionspec import (RevisionSpec_dwim, revspec_registry)
97
97
revspec_registry.register_lazy("git:", __name__ + ".revspec",
98
98
    "RevisionSpec_git")
99
99
RevisionSpec_dwim.append_possible_lazy_revspec(
111
111
            external_url.startswith("https:")):
112
112
            # Already handled by RemoteGitProber
113
113
            raise bzr_errors.NotBranchError(path=transport.base)
114
 
        from ... import urlutils
 
114
        from .. import urlutils
115
115
        if urlutils.split(transport.base)[1] == ".git":
116
116
            raise bzr_errors.NotBranchError(path=transport.base)
117
117
        if not transport.has_any(['objects', '.git/objects', '.git']):
144
144
class RemoteGitProber(Prober):
145
145
 
146
146
    def probe_http_transport(self, transport):
147
 
        from ... import urlutils
 
147
        from .. import urlutils
148
148
        base_url, _ = urlutils.split_segment_parameters(transport.external_url())
149
149
        url = urlutils.join(base_url, "info/refs") + "?service=git-upload-pack"
150
 
        from ...transport.http import Request
 
150
        from ..transport.http import Request
151
151
        headers = {"Content-Type": "application/x-git-upload-pack-request"}
152
152
        req = Request('GET', url, accepted_errors=[200, 403, 404, 405],
153
153
                      headers=headers)
253
253
    else:
254
254
        stanza.add("git-commit", git_commit)
255
255
 
256
 
from ...hooks import install_lazy_named_hook
 
256
from ..hooks import install_lazy_named_hook
257
257
install_lazy_named_hook("breezy.version_info_formats.format_rio",
258
258
    "RioVersionInfoBuilder.hooks", "revision", update_stanza,
259
259
    "git commits")
273
273
    'serve_git_upload_pack',
274
274
    help='Git Smart server upload pack command. (inetd mode only)')
275
275
 
276
 
from ...repository import (
 
276
from ..repository import (
277
277
    format_registry as repository_format_registry,
278
278
    network_format_registry as repository_network_format_registry,
279
279
    )
285
285
register_extra_lazy_repository_format(__name__ + '.repository',
286
286
    'GitRepositoryFormat')
287
287
 
288
 
from ...branch import (
 
288
from ..branch import (
289
289
    network_format_registry as branch_network_format_registry,
290
290
    )
291
291
branch_network_format_registry.register_lazy('git',
292
292
    __name__ + '.branch', 'LocalGitBranchFormat')
293
293
 
294
294
 
295
 
from ...branch import (
 
295
from ..branch import (
296
296
    format_registry as branch_format_registry,
297
297
    )
298
298
branch_format_registry.register_extra_lazy(
305
305
    )
306
306
 
307
307
 
308
 
from ...workingtree import (
 
308
from ..workingtree import (
309
309
    format_registry as workingtree_format_registry,
310
310
    )
311
311
workingtree_format_registry.register_extra_lazy(
318
318
 
319
319
 
320
320
try:
321
 
    from ...registry import register_lazy
 
321
    from ..registry import register_lazy
322
322
except ImportError:
323
 
    from ...diff import format_registry as diff_format_registry
 
323
    from ..diff import format_registry as diff_format_registry
324
324
    diff_format_registry.register_lazy('git', __name__ + '.send',
325
325
        'GitDiffTree', 'Git am-style diff format')
326
326
 
327
 
    from ...send import (
 
327
    from ..send import (
328
328
        format_registry as send_format_registry,
329
329
        )
330
330
    send_format_registry.register_lazy('git', __name__ + '.send',
331
331
                                       'send_git', 'Git am-style diff format')
332
332
 
333
 
    from ...directory_service import directories
 
333
    from ..directory_service import directories
334
334
    directories.register_lazy('github:', __name__ + '.directory',
335
335
                              'GitHubDirectory',
336
336
                              'GitHub directory.')
338
338
                              'GitHubDirectory',
339
339
                              'GitHub directory.')
340
340
 
341
 
    from ...help_topics import (
 
341
    from ..help_topics import (
342
342
        topic_registry,
343
343
        )
344
344
    topic_registry.register_lazy('git', __name__ + '.help', 'help_git',
345
345
        'Using Bazaar with Git')
346
346
 
347
 
    from ...foreign import (
 
347
    from ..foreign import (
348
348
        foreign_vcs_registry,
349
349
        )
350
350
    foreign_vcs_registry.register_lazy("git",
427
427
    loggerhead_git_hook, "git support")
428
428
 
429
429
 
430
 
from ...config import (
 
430
from ..config import (
431
431
    option_registry,
432
432
    Option,
433
433
    bool_from_store,