diff --git a/CHANGES b/CHANGES index 02af7d2c0..27d29cebc 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/libvcs/cmd/hg.py b/libvcs/cmd/hg.py index aed789df0..c2df2b940 100644 --- a/libvcs/cmd/hg.py +++ b/libvcs/cmd/hg.py @@ -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: @@ -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: diff --git a/libvcs/cmd/svn.py b/libvcs/cmd/svn.py index 9bfbd4dcc..ea9a0c15a 100644 --- a/libvcs/cmd/svn.py +++ b/libvcs/cmd/svn.py @@ -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) @@ -230,7 +230,7 @@ def auth( ): """ Wraps `svn auth - `_. + `_. Parameters ---------- @@ -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") @@ -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") @@ -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: