From 0f90519f3b1b25b6e2f0b3a71ddf3fa38e8a82d2 Mon Sep 17 00:00:00 2001 From: Ajeya Bhat Date: Fri, 7 Jun 2024 13:37:46 +0530 Subject: [PATCH] singled threaded transfer --- outpostcli/constants.py | 2 +- outpostcli/lfs/commands.py | 33 +++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- setup.py | 2 +- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/outpostcli/constants.py b/outpostcli/constants.py index 85f71e3..f38a996 100644 --- a/outpostcli/constants.py +++ b/outpostcli/constants.py @@ -1,2 +1,2 @@ -cli_version = "0.0.59" +cli_version = "0.0.60" CLI_BINARY_NAME = "outpostcli" diff --git a/outpostcli/lfs/commands.py b/outpostcli/lfs/commands.py index b0aab4d..6782fe2 100644 --- a/outpostcli/lfs/commands.py +++ b/outpostcli/lfs/commands.py @@ -72,6 +72,39 @@ def enable_largefiles(path): click.echo("Local repository set up for largefiles") +@lfs.command(name="disable-multipart") +@click.argument("path", type=str) +def enable_largefiles(path): + """Configure your repository to enable upload of files > 5GB""" + local_path = os.path.abspath(path) + + if not os.path.isdir(local_path): + click.echo("This does not look like a valid git repo.") + sys.exit(1) + + subprocess.check_call( + "git config --unset lfs.customtransfer.multipart-basic.path".split(), + cwd=local_path, + ) + + subprocess.check_call( + ["git", "config", "--unset", "lfs.customtransfer.multipart-basic.args"], + cwd=local_path, + ) + + subprocess.check_call( + [ + "git", + "config", + "--unset", + "lfs.customtransfer.multipart-basic.concurrent", + ], + cwd=local_path, + ) + + click.echo("multipart upload configs removed.") + + @lfs.command(name=MULTIPART_UPLOAD_COMMAND_NAME) def multipart_upload(): try: diff --git a/pyproject.toml b/pyproject.toml index 8c36e2a..a8bfad6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "outpostcli" -version = "0.0.59" +version = "0.0.60" description = "CLI for Outpost" readme = "README.md" license = { file = "LICENSE" } diff --git a/setup.py b/setup.py index d454506..a261d6d 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="outpostcli", - version="0.0.59", + version="0.0.60", py_modules=["outpostcli"], install_requires=["Click", "outpostkit"], entry_points={