Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 29616:3fde328d0913 stable
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.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 19 Jul 2016 19:57:34 -0700 |
parents | e417664a3339 |
children | 3b4d69b3988d |
comparison
equal
deleted
inserted
replaced
29615:a2a380e2750f | 29616:3fde328d0913 |
---|---|
921 r = src.config('bundle', 'mainreporoot') | 921 r = src.config('bundle', 'mainreporoot') |
922 if r: | 922 if r: |
923 dst.setconfig('bundle', 'mainreporoot', r, 'copied') | 923 dst.setconfig('bundle', 'mainreporoot', r, 'copied') |
924 | 924 |
925 # copy selected local settings to the remote ui | 925 # copy selected local settings to the remote ui |
926 for sect in ('auth', 'hostfingerprints', 'http_proxy'): | 926 for sect in ('auth', 'hostfingerprints', 'hostsecurity', 'http_proxy'): |
927 for key, val in src.configitems(sect): | 927 for key, val in src.configitems(sect): |
928 dst.setconfig(sect, key, val, 'copied') | 928 dst.setconfig(sect, key, val, 'copied') |
929 v = src.config('web', 'cacerts') | 929 v = src.config('web', 'cacerts') |
930 if v: | 930 if v: |
931 dst.setconfig('web', 'cacerts', util.expandpath(v), 'copied') | 931 dst.setconfig('web', 'cacerts', util.expandpath(v), 'copied') |