/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: 2019-06-15 18:10:11 UTC
  • mfrom: (6060.9.10 cachedir)
  • Revision ID: breezy.the.bot@gmail.com-20190615181011-h2z3rb4s9t1af8mb
Add osutils.cache_dir function and use it where we create Breezy-specific caches.

Merged from https://code.launchpad.net/~jelmer/brz/cachedir/+merge/362708

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 
52
52
 
53
53
def get_cache_dir():
54
 
    try:
55
 
        from xdg.BaseDirectory import xdg_cache_home
56
 
    except ImportError:
57
 
        from ..config import config_dir
58
 
        ret = os.path.join(config_dir(), "git")
59
 
    else:
60
 
        ret = os.path.join(xdg_cache_home, "breezy", "git")
 
54
    ret = os.path.join(osutils.cache_dir(), "git")
61
55
    if not os.path.isdir(ret):
62
56
        os.makedirs(ret)
63
57
    return ret