Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ $ pip install --user --upgrade --pre libvcs

### Bug fixes

- Fix argument input for git commands, e.g. `git config --get color.diff` would not properly
pass-through to subprocess. {issue}`360`
- Fix argument input for commands, e.g. `git config --get color.diff` would not properly
pass-through to subprocess. git: {issue}`360`, svn and hg: {issue}`365`

### Internals

Expand Down
16 changes: 8 additions & 8 deletions libvcs/cmd/hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ def run(
kwargs["cwd"] = self.dir

if repository is not None:
cli_args.append(f"--repository {repository}")
cli_args.extend(["--repository", repository])
if config is not None:
cli_args.append("--config {config}")
cli_args.extend(["--config", config])
if pager is not None:
cli_args.append(f"--pager {pager}")
cli_args.append(["--pager", pager])
if color is not None:
cli_args.append(f"--color {color}")
cli_args.append(["--color", color])
if verbose is True:
cli_args.append("verbose")
if quiet is True:
Expand Down Expand Up @@ -189,13 +189,13 @@ def clone(
local_flags: list[str] = []

if ssh is not None:
local_flags.append(f"--ssh {ssh}")
local_flags.extend(["--ssh", ssh])
if remote_cmd is not None:
local_flags.append(f"--remotecmd {remote_cmd}")
local_flags.extend(["--remotecmd", remote_cmd])
if rev is not None:
local_flags.append(f"--rev {rev}")
local_flags.extend(["--rev", rev])
if branch is not None:
local_flags.append(f"--branch {branch}")
local_flags.extend(["--branch", branch])
if no_update is True:
local_flags.append("--noupdate")
if pull is True:
Expand Down
16 changes: 8 additions & 8 deletions libvcs/cmd/svn.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ def run(
if non_interactive is True:
cli_args.append("--non-interactive")
if username is not None:
cli_args.append(f"--username {username}")
cli_args.extend(["--username", username])
if password is not None:
cli_args.append(f"--password {password}")
cli_args.extend(["--password", password])
if trust_server_cert is True:
cli_args.append("--trust-server_cert")
if config_dir is not None:
cli_args.append("--config-dir {config_dir}")
cli_args.extend(["--config-dir", str(config_dir)])
if config_option is not None:
cli_args.append("--config-option {config_option}")
cli_args.extend(["--config-option", str(config_option)])

return run(args=cli_args, **kwargs)

Expand Down Expand Up @@ -230,7 +230,7 @@ def auth(
):
"""
Wraps `svn auth
<https://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.auth.html>`_.
<https://subversion.apache.org/faq.html#plaintext-passwords>`_.

Parameters
----------
Expand All @@ -247,7 +247,7 @@ def auth(
local_flags: list[str] = [*args]

if remove is not None:
local_flags.append(f"--remove {remove}")
local_flags.extend(["--remove", remove])
if show_passwords is True:
local_flags.append("--show-passwords")

Expand Down Expand Up @@ -317,7 +317,7 @@ def blame(
if xml is True:
local_flags.append("--xml")
if extensions is not None:
local_flags.append(f"--extensions {extensions}")
local_flags.extend(["--extensions", extensions])
if force is True:
local_flags.append("--force")

Expand Down Expand Up @@ -418,7 +418,7 @@ def commit(
if no_unlock is True:
local_flags.append("--no-unlock")
if file is not None:
local_flags.append(f"--file {file}")
local_flags.extend(["--file", str(file)])
if force_log is True:
local_flags.append("--force")
if include_externals is True:
Expand Down