Patchwork [06,of,11] dispatch: set ui.insecureconnections when --insecure is used

login
register
mail settings
Submitter Gregory Szorc
Date May 5, 2016, 7:53 a.m.
Message ID <a34fbd2d6235b34319d8.1462434803@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/14898/
State Accepted
Headers show

Comments

Gregory Szorc - May 5, 2016, 7:53 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1462433662 25200
#      Thu May 05 00:34:22 2016 -0700
# Node ID a34fbd2d6235b34319d857bbbb313f1cc53d554b
# Parent  328a6fef953a7f6de589b6132c7927676415386e
dispatch: set ui.insecureconnections when --insecure is used

Patch

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -820,16 +820,18 @@  def _dispatch(req):
             ui_.setconfig('ui', 'traceback', 'on', '--traceback')
 
     if options['noninteractive']:
         for ui_ in uis:
             ui_.setconfig('ui', 'interactive', 'off', '-y')
 
     if cmdoptions.get('insecure', False):
         for ui_ in uis:
+            ui_.insecureconnections = True
+            # TODO remove once consumers are gone.
             ui_.setconfig('web', 'cacerts', '!', '--insecure')
 
     if options['version']:
         return commands.version_(ui)
     if options['help']:
         return commands.help_(ui, cmd, command=cmd is not None)
     elif not cmd:
         return commands.help_(ui, 'shortlist')