29
from bzrlib import bzrdir, errors as bzr_errors
30
from bzrlib.foreign import foreign_vcs_registry
31
from bzrlib.lockable_files import TransportLock
32
from bzrlib.transport import register_lazy_transport
33
from bzrlib.commands import plugin_cmds
34
from bzrlib.trace import warning
36
MINIMUM_DULWICH_VERSION = (0, 1, 0)
37
COMPATIBLE_BZR_VERSIONS = [(1, 11, 0), (1, 12, 0)]
33
from bzrlib.foreign import (
36
from bzrlib.lockable_files import (
39
from bzrlib.transport import (
40
register_lazy_transport,
41
register_transport_proto,
43
from bzrlib.commands import (
46
from bzrlib.trace import (
50
# versions ending in 'exp' mean experimental mappings
51
# versions ending in 'dev' mean development version
52
# versions ending in 'final' mean release (well tested, etc)
53
version_info = (0, 2, 0, 'dev', 0)
55
if version_info[3] == 'final':
56
version_string = '%d.%d.%d' % version_info[:3]
58
version_string = '%d.%d.%d%s%d' % version_info
59
__version__ = version_string
61
MINIMUM_DULWICH_VERSION = (0, 1, 1)
62
COMPATIBLE_BZR_VERSIONS = [(1, 13, 0)]
39
64
if getattr(sys, "frozen", None):
40
65
# allow import additional libs from ./_lib for bzr.exe only
61
86
help='GIT repository.', native=False, experimental=True,
65
from bzrlib.revisionspec import revspec_registry
66
revspec_registry.register_lazy("git:", "bzrlib.plugins.git.revspec",
70
from bzrlib.revisionspec import SPEC_TYPES
71
from bzrlib.plugins.git.revspec import RevisionSpec_git
72
SPEC_TYPES.append(RevisionSpec_git)
89
from bzrlib.revisionspec import revspec_registry
90
revspec_registry.register_lazy("git:", "bzrlib.plugins.git.revspec",
74
93
class GitBzrDirFormat(bzrdir.BzrDirFormat):
75
94
_lock_class = TransportLock
202
221
bzrdir.BzrDirFormat.register_control_format(LocalGitBzrDirFormat)
203
222
bzrdir.BzrDirFormat.register_control_format(RemoteGitBzrDirFormat)
224
register_transport_proto('git://',
225
help="Access using the Git smart server protocol.")
226
register_transport_proto('git+ssh://',
227
help="Access using the Git smart server protocol over SSH.")
205
229
register_lazy_transport("git://", 'bzrlib.plugins.git.remote',
230
'TCPGitSmartTransport')
232
register_lazy_transport("git+ssh://", 'bzrlib.plugins.git.remote',
233
'SSHGitSmartTransport')
208
235
foreign_vcs_registry.register_lazy("git",
209
236
"bzrlib.plugins.git.mapping",
213
240
plugin_cmds.register_lazy("cmd_git_serve", [], "bzrlib.plugins.git.commands")
214
241
plugin_cmds.register_lazy("cmd_git_import", [], "bzrlib.plugins.git.commands")
243
def get_rich_root_format():
245
return bzrdir.format_registry.make_bzrdir("default-rich-root")
247
return bzrdir.format_registry.make_bzrdir("1.9-rich-root")
216
249
def test_suite():
217
250
from bzrlib.plugins.git import tests
218
251
return tests.test_suite()