diff mercurial/dispatch.py @ 13328:a939f08fae9c stable

url: add --insecure option to bypass verification of ssl certificates If --insecure specified, it behaves in the same way as no web.cacerts configured. Also shows hint for --insecure option when _verifycert() failed. But currently the hint isn't displayed on SSLError, because it needs a certain level of changes.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 29 Jan 2011 23:23:24 +0900
parents ab93029ab622
children d747774ca9da
line wrap: on
line diff
--- a/mercurial/dispatch.py	Mon Jan 31 13:33:41 2011 +0100
+++ b/mercurial/dispatch.py	Sat Jan 29 23:23:24 2011 +0900
@@ -552,6 +552,9 @@
     if options['noninteractive']:
         ui.setconfig('ui', 'interactive', 'off')
 
+    if cmdoptions.get('insecure', False):
+        ui.setconfig('web', 'cacerts', '')
+
     if options['help']:
         return commands.help_(ui, cmd, options['version'])
     elif options['version']: