git-buckets 0.4.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {git_buckets-0.4.0 → git_buckets-0.4.1}/PKG-INFO +1 -1
- {git_buckets-0.4.0 → git_buckets-0.4.1}/pyproject.toml +1 -1
- {git_buckets-0.4.0 → git_buckets-0.4.1}/pyproject.toml.orig +1 -1
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/lfs_agent.py +8 -7
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/termio.py +2 -2
- {git_buckets-0.4.0 → git_buckets-0.4.1}/README.md +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/__init__.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/cli.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/credential.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/hosts.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/keyring/__init__.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/keyring/backend.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/keyring/proof.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/login.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/net.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/oauth.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/package.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/repo.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/secretstore.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/session.py +0 -0
- {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/wake.py +0 -0
|
@@ -47,6 +47,7 @@ from concurrent.futures import FIRST_EXCEPTION, ThreadPoolExecutor, wait
|
|
|
47
47
|
from hashlib import sha256
|
|
48
48
|
from http.client import HTTPException
|
|
49
49
|
from pathlib import Path
|
|
50
|
+
from shutil import which
|
|
50
51
|
from tempfile import gettempdir
|
|
51
52
|
from typing import Any
|
|
52
53
|
from urllib.error import HTTPError, URLError
|
|
@@ -643,6 +644,10 @@ def install(remote: str = 'origin', *, echo: Any = print) -> dict[str, str]:
|
|
|
643
644
|
scopes the transfers it offers to the direction each is registered for (verified against 3.8.0), so a
|
|
644
645
|
repo still carrying ``direction = upload`` from an older gb offers ``gb`` on an upload batch and never on
|
|
645
646
|
a download, and the server answers it with a basic download exactly as before.
|
|
647
|
+
|
|
648
|
+
The path is the bare command name, not where it resolves today: git-lfs looks it up on PATH each time it
|
|
649
|
+
starts the agent, so one checkout works from every machine and container that mounts it, and from any
|
|
650
|
+
install of gb that puts the script on PATH.
|
|
646
651
|
"""
|
|
647
652
|
_git(['rev-parse', '--git-dir'])
|
|
648
653
|
url = _git(['remote', 'get-url', remote], check=False)
|
|
@@ -650,9 +655,11 @@ def install(remote: str = 'origin', *, echo: Any = print) -> dict[str, str]:
|
|
|
650
655
|
echo(f'Warning: this repo has no remote named {remote}.')
|
|
651
656
|
elif not urlparse(url).hostname or hosts.resolve(urlparse(url).hostname or '') is None:
|
|
652
657
|
echo(f'Warning: {remote} ({url}) is not a deployment gb is logged in to; run gb login first.')
|
|
658
|
+
if which(AGENT_SCRIPT) is None:
|
|
659
|
+
echo(f'Warning: {AGENT_SCRIPT} is not on PATH here; git-lfs cannot start the agent until it is.')
|
|
653
660
|
|
|
654
661
|
settings = {
|
|
655
|
-
f'lfs.customtransfer.{TRANSFER}.path':
|
|
662
|
+
f'lfs.customtransfer.{TRANSFER}.path': AGENT_SCRIPT,
|
|
656
663
|
f'lfs.customtransfer.{TRANSFER}.direction': 'both',
|
|
657
664
|
f'lfs.customtransfer.{TRANSFER}.concurrent': 'true',
|
|
658
665
|
'lfs.concurrenttransfers': '3',
|
|
@@ -662,12 +669,6 @@ def install(remote: str = 'origin', *, echo: Any = print) -> dict[str, str]:
|
|
|
662
669
|
return settings
|
|
663
670
|
|
|
664
671
|
|
|
665
|
-
def _agent_path() -> str:
|
|
666
|
-
from shutil import which
|
|
667
|
-
|
|
668
|
-
return which(AGENT_SCRIPT) or AGENT_SCRIPT
|
|
669
|
-
|
|
670
|
-
|
|
671
672
|
def _git(args: list[str], *, check: bool = True) -> str:
|
|
672
673
|
result = subprocess.run(['git', *args], capture_output=True, text=True)
|
|
673
674
|
if result.returncode != 0:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import sys
|
|
5
|
-
from collections.abc import Callable,
|
|
5
|
+
from collections.abc import Callable, Generator
|
|
6
6
|
from contextlib import contextmanager
|
|
7
7
|
|
|
8
8
|
import click
|
|
@@ -25,7 +25,7 @@ class _NoRawMode(Exception):
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
@contextmanager
|
|
28
|
-
def _raw_reader() ->
|
|
28
|
+
def _raw_reader() -> Generator[Read]:
|
|
29
29
|
"""Raw mode for the whole prompt, not per read.
|
|
30
30
|
|
|
31
31
|
click.getchar() restores cooked mode between reads, and toggling ICANON with a paste still in the input
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|