# HG changeset patch # User Mathias De Mare # Date 1646834891 -3600 # Node ID 934608d4fcbae7830f9e76f83d9101f6ab8ab5ea # Parent e86a925ba6a0e95873682517ccd45ea235fd89e1 hglib: make sure configs can be passed to clone command Differential Revision: https://phab.mercurial-scm.org/D12360 diff -r e86a925ba6a0 -r 934608d4fcba hglib/__init__.py --- 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()