/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/cache.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:
29
29
    ShaFile,
30
30
    )
31
31
 
32
 
from ... import (
 
32
from .. import (
33
33
    errors as bzr_errors,
34
34
    osutils,
35
35
    registry,
36
36
    trace,
37
37
    )
38
 
from ...bzr import (
 
38
from ..bzr import (
39
39
    btree_index as _mod_btree_index,
40
40
    index as _mod_index,
41
41
    versionedfile,
42
42
    )
43
 
from ...transport import (
 
43
from ..transport import (
44
44
    get_transport,
45
45
    )
46
46
 
49
49
    try:
50
50
        from xdg.BaseDirectory import xdg_cache_home
51
51
    except ImportError:
52
 
        from ...config import config_dir
 
52
        from ..config import config_dir
53
53
        ret = os.path.join(config_dir(), "git")
54
54
    else:
55
55
        ret = os.path.join(xdg_cache_home, "breezy", "git")
219
219
        :param repository: Repository to open the cache for
220
220
        :return: A `BzrGitCache`
221
221
        """
222
 
        from ...transport.local import LocalTransport
 
222
        from ..transport.local import LocalTransport
223
223
        repo_transport = getattr(repository, "_transport", None)
224
224
        if (repo_transport is not None and
225
225
            isinstance(repo_transport, LocalTransport)):
813
813
            except bzr_errors.FileExists:
814
814
                pass
815
815
            return cls(transport.clone('git'))
816
 
        from ...transport import get_transport
 
816
        from ..transport import get_transport
817
817
        return cls(get_transport(get_cache_dir()))
818
818
 
819
819
    def __repr__(self):