/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

Add FOSDEM roundtripping notes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
"""A GIT branch and repository format implementation for bzr."""
23
23
 
 
24
import os
 
25
import sys
 
26
 
24
27
import bzrlib
25
28
import bzrlib.api
26
29
from bzrlib import bzrdir, errors as bzr_errors
33
36
MINIMUM_DULWICH_VERSION = (0, 1, 0)
34
37
COMPATIBLE_BZR_VERSIONS = [(1, 11, 0), (1, 12, 0)]
35
38
 
 
39
if getattr(sys, "frozen", None):
 
40
    # allow import additional libs from ./_lib for bzr.exe only
 
41
    sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '_lib')))
 
42
 
36
43
_versions_checked = False
37
44
def lazy_check_versions():
38
45
    global _versions_checked
42
49
    try:
43
50
        from dulwich import __version__ as dulwich_version
44
51
    except ImportError:
45
 
        warning("Please install dulwich, https://launchpad.net/dulwich")
46
 
        raise
 
52
        raise ImportError("bzr-git: Please install dulwich, https://launchpad.net/dulwich")
47
53
    else:
48
54
        if dulwich_version < MINIMUM_DULWICH_VERSION:
49
 
            warning("Dulwich is too old; at least %d.%d.%d is required" % MINIMUM_DULWICH_VERSION)
50
 
            raise ImportError
 
55
            raise ImportError("bzr-git: Dulwich is too old; at least %d.%d.%d is required" % MINIMUM_DULWICH_VERSION)
51
56
 
52
57
bzrlib.api.require_any_api(bzrlib, COMPATIBLE_BZR_VERSIONS)
53
58