Patchwork [2,of,3,V2] httpconnection: allow a global auth.cookiefile config entry

login
register
mail settings
Submitter Gregory Szorc
Date March 29, 2017, 3 a.m.
Message ID <5cf00a25e8c066bd664d.1490756449@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/19808/
State Accepted
Headers show

Comments

Gregory Szorc - March 29, 2017, 3 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1489127710 28800
#      Thu Mar 09 22:35:10 2017 -0800
# Node ID 5cf00a25e8c066bd664dde4cb302bd52a75195d6
# Parent  011f4e38687438d273410faf7b960845e4e0b735
httpconnection: allow a global auth.cookiefile config entry

This foreshadows support for defining a cookies file.

Patch

diff --git a/mercurial/httpconnection.py b/mercurial/httpconnection.py
--- a/mercurial/httpconnection.py
+++ b/mercurial/httpconnection.py
@@ -69,6 +69,9 @@  def readauthforuri(ui, uri, user):
     # Read configuration
     groups = {}
     for key, val in ui.configitems('auth'):
+        if key in ('cookiefile',):
+            continue
+
         if '.' not in key:
             ui.warn(_("ignoring invalid [auth] key '%s'\n") % key)
             continue