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

Move imports down, might not be available in older bzr-git versions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
import bzrlib
28
28
import bzrlib.api
 
29
 
 
30
# versions ending in 'exp' mean experimental mappings
 
31
# versions ending in 'dev' mean development version
 
32
# versions ending in 'final' mean release (well tested, etc)
 
33
version_info = (0, 3, 1, 'final', 0)
 
34
 
 
35
if version_info[3] == 'final':
 
36
    version_string = '%d.%d.%d' % version_info[:3]
 
37
else:
 
38
    version_string = '%d.%d.%d%s%d' % version_info
 
39
__version__ = version_string
 
40
 
 
41
MINIMUM_DULWICH_VERSION = (0, 3, 1)
 
42
COMPATIBLE_BZR_VERSIONS = [(1, 14, 0), (1, 15, 0)]
 
43
 
 
44
bzrlib.api.require_any_api(bzrlib, COMPATIBLE_BZR_VERSIONS)
 
45
 
 
46
 
29
47
from bzrlib import (
30
48
    bzrdir,
31
49
    errors as bzr_errors,
52
70
    )
53
71
 
54
72
 
55
 
# versions ending in 'exp' mean experimental mappings
56
 
# versions ending in 'dev' mean development version
57
 
# versions ending in 'final' mean release (well tested, etc)
58
 
version_info = (0, 3, 1, 'final', 0)
59
 
 
60
 
if version_info[3] == 'final':
61
 
    version_string = '%d.%d.%d' % version_info[:3]
62
 
else:
63
 
    version_string = '%d.%d.%d%s%d' % version_info
64
 
__version__ = version_string
65
 
 
66
 
MINIMUM_DULWICH_VERSION = (0, 3, 1)
67
 
COMPATIBLE_BZR_VERSIONS = [(1, 14, 0), (1, 15, 0)]
68
 
 
69
73
if getattr(sys, "frozen", None):
70
74
    # allow import additional libs from ./_lib for bzr.exe only
71
75
    sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '_lib')))
84
88
        if dulwich_version < MINIMUM_DULWICH_VERSION:
85
89
            raise ImportError("bzr-git: Dulwich is too old; at least %d.%d.%d is required" % MINIMUM_DULWICH_VERSION)
86
90
 
87
 
bzrlib.api.require_any_api(bzrlib, COMPATIBLE_BZR_VERSIONS)
88
 
 
89
91
bzrdir.format_registry.register_lazy('git', 
90
92
    "bzrlib.plugins.git.dir", "LocalGitBzrDirFormat",
91
93
    help='GIT repository.', native=False, experimental=True,