/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-08-11 12:19:56 UTC
  • mfrom: (6986.2.4 git-graduate)
  • Revision ID: breezy.the.bot@gmail.com-20180811121956-vg4h6snulccpy99e
Move git support to breezy.git.

Merged from https://code.launchpad.net/~jelmer/brz/git-graduate/+merge/348051

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 ...sixish import (
 
43
from ..sixish import (
44
44
    viewitems,
45
45
    viewkeys,
46
46
    viewvalues,
47
47
    )
48
 
from ...transport import (
 
48
from ..transport import (
49
49
    get_transport,
50
50
    )
51
51
 
54
54
    try:
55
55
        from xdg.BaseDirectory import xdg_cache_home
56
56
    except ImportError:
57
 
        from ...config import config_dir
 
57
        from ..config import config_dir
58
58
        ret = os.path.join(config_dir(), "git")
59
59
    else:
60
60
        ret = os.path.join(xdg_cache_home, "breezy", "git")
224
224
        :param repository: Repository to open the cache for
225
225
        :return: A `BzrGitCache`
226
226
        """
227
 
        from ...transport.local import LocalTransport
 
227
        from ..transport.local import LocalTransport
228
228
        repo_transport = getattr(repository, "_transport", None)
229
229
        if (repo_transport is not None and
230
230
            isinstance(repo_transport, LocalTransport)):
829
829
            except bzr_errors.FileExists:
830
830
                pass
831
831
            return cls(transport.clone('git'))
832
 
        from ...transport import get_transport
 
832
        from ..transport import get_transport
833
833
        return cls(get_transport(get_cache_dir()))
834
834
 
835
835
    def __repr__(self):