Mercurial > python-hglib
changeset 218:934608d4fcba
hglib: make sure configs can be passed to clone command
Differential Revision: https://phab.mercurial-scm.org/D12360
author | Mathias De Mare <mathias.de_mare@nokia.com> |
---|---|
date | Wed, 09 Mar 2022 15:08:11 +0100 |
parents | e86a925ba6a0 |
children | 8341f2494b3f |
files | hglib/__init__.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hglib/__init__.py Tue Mar 14 13:02:48 2023 +0100 +++ b/hglib/__init__.py Wed Mar 09 15:08:11 2022 +0100 @@ -31,6 +31,13 @@ pull=pull, uncompressed=uncompressed, e=ssh, remotecmd=remotecmd, insecure=insecure) + # insert configs at the front so they don't interfere with positional args + if configs: + cmdconfigs = [] + for config in configs: + cmdconfigs.extend(["--config", config]) + args = cmdconfigs + args + args.insert(0, HGPATH) proc = util.popen(args) out, err = proc.communicate()