~jelmer/brz/optional-parentid

« back to all changes in this revision

Viewing changes to breezy/git/cache.py

  • Committer: The Breezy Bot
  • Author(s): Jelmer Vernooij
  • Date: 2023-05-24 01:59:08 UTC
  • mfrom: (7824.1.3 git)
  • Revision ID: the_breezy_bot-20230524015908-dty0np0wz9v9vkde
Move some git stuff to rust

by jelmer review by jelmer

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from dulwich.objects import ShaFile, hex_to_sha, sha_to_hex
24
24
 
25
 
from .. import bedding
26
25
from .. import errors as bzr_errors
27
26
from .. import registry, trace
 
27
from .._git_rs import get_cache_dir  # noqa: F401
28
28
from ..bzr import btree_index as _mod_btree_index
29
29
from ..bzr import index as _mod_index
30
30
from ..bzr import versionedfile
31
31
from ..transport import FileExists, NoSuchFile, get_transport_from_path
32
32
 
33
33
 
34
 
def get_cache_dir():
35
 
    path = os.path.join(bedding.cache_dir(), "git")
36
 
    if not os.path.isdir(path):
37
 
        os.mkdir(path)
38
 
    return path
39
 
 
40
 
 
41
34
def get_remote_cache_transport(repository):
42
35
    """Retrieve the transport to use when accessing (unwritable) remote
43
36
    repositories.