Skip to content
Snippets Groups Projects
Commit 3fde328d authored by Gregory Szorc's avatar Gregory Szorc
Browse files

hg: copy [hostsecurity] options to remote ui instances (issue5305)

TIL that ui instances for remote/peer repos don't automagically inherit
config options from .hg/hgrc files.

This patch makes remote ui instances inherit options from the
[hostsecurity] section. We were already inheriting options
from [hostfingerprints] and [auth]. So adding [hostsecurity] to the
list seems appropriate.
parent a2a380e2
No related branches found
No related tags found
No related merge requests found
......@@ -923,7 +923,7 @@
dst.setconfig('bundle', 'mainreporoot', r, 'copied')
# copy selected local settings to the remote ui
for sect in ('auth', 'hostfingerprints', 'http_proxy'):
for sect in ('auth', 'hostfingerprints', 'hostsecurity', 'http_proxy'):
for key, val in src.configitems(sect):
dst.setconfig(sect, key, val, 'copied')
v = src.config('web', 'cacerts')
......
......@@ -501,6 +501,17 @@
abort: error: *unsupported protocol* (glob)
[255]
.hg/hgrc file [hostsecurity] settings are applied to remote ui instances (issue5305)
$ cat >> copy-pull/.hg/hgrc << EOF
> [hostsecurity]
> localhost:minimumprotocol=tls1.2
> EOF
$ P="$CERTSDIR" hg -R copy-pull id https://localhost:$HGPORT/
(could not negotiate a common protocol; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this error)
abort: error: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:590)
[255]
$ killdaemons.py hg0.pid
$ killdaemons.py hg1.pid
$ killdaemons.py hg2.pid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment