30
33
from bzrlib.commands import plugin_cmds
31
34
from bzrlib.trace import warning
33
MINIMUM_DULWICH_VERSION = (0, 1, 0)
34
COMPATIBLE_BZR_VERSIONS = [(1, 11, 0), (1, 12, 0)]
36
# versions ending in 'exp' mean experimental mappings
37
# versions ending in 'dev' mean development version
38
# versions ending in 'final' mean release (well tested, etc)
39
version_info = (0, 2, 0, 'dev', 0)
41
if version_info[3] == 'final':
42
version_string = '%d.%d.%d' % version_info[:3]
44
version_string = '%d.%d.%d%s%d' % version_info
45
__version__ = version_string
47
MINIMUM_DULWICH_VERSION = (0, 1, 1)
48
COMPATIBLE_BZR_VERSIONS = [(1, 13, 0)]
50
if getattr(sys, "frozen", None):
51
# allow import additional libs from ./_lib for bzr.exe only
52
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '_lib')))
36
54
_versions_checked = False
37
55
def lazy_check_versions():
43
61
from dulwich import __version__ as dulwich_version
44
62
except ImportError:
45
warning("Please install dulwich, https://launchpad.net/dulwich")
63
raise ImportError("bzr-git: Please install dulwich, https://launchpad.net/dulwich")
48
65
if dulwich_version < MINIMUM_DULWICH_VERSION:
49
warning("Dulwich is too old; at least %d.%d.%d is required" % MINIMUM_DULWICH_VERSION)
66
raise ImportError("bzr-git: Dulwich is too old; at least %d.%d.%d is required" % MINIMUM_DULWICH_VERSION)
52
68
bzrlib.api.require_any_api(bzrlib, COMPATIBLE_BZR_VERSIONS)
208
224
plugin_cmds.register_lazy("cmd_git_serve", [], "bzrlib.plugins.git.commands")
209
225
plugin_cmds.register_lazy("cmd_git_import", [], "bzrlib.plugins.git.commands")
227
def get_rich_root_format():
229
return bzrdir.format_registry.make_bzrdir("default-rich-root")
231
return bzrdir.format_registry.make_bzrdir("1.9-rich-root")
211
233
def test_suite():
212
234
from bzrlib.plugins.git import tests
213
235
return tests.test_suite()