mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
ui: add an instance flag to hold --insecure bit
Currently, when --insecure is used we set web.cacerts=! and socket validation takes this value into account. web.cacerts=! is not documented AFAICT and is purely an internal implementation detail. Let's be more explicit about what is going on by introducing a dedicated variable outside of the config values to track that --insecure is used.
This commit is contained in:
parent
b7af0f8d55
commit
df3e0225af
@ -107,6 +107,8 @@ class ui(object):
|
||||
self._trustusers = set()
|
||||
self._trustgroups = set()
|
||||
self.callhooks = True
|
||||
# Insecure server connections requested.
|
||||
self.insecureconnections = False
|
||||
|
||||
if src:
|
||||
self.fout = src.fout
|
||||
@ -120,6 +122,7 @@ class ui(object):
|
||||
self._trustgroups = src._trustgroups.copy()
|
||||
self.environ = src.environ
|
||||
self.callhooks = src.callhooks
|
||||
self.insecureconnections = src.insecureconnections
|
||||
self.fixconfig()
|
||||
else:
|
||||
self.fout = sys.stdout
|
||||
|
Loading…
Reference in New Issue
Block a user