Patchwork [1,of,2] url: show full url of proxy server in debug message

login
register
mail settings
Submitter Yuya Nishihara
Date Feb. 18, 2018, 1:55 p.m.
Message ID <20fd00ae43f25ab4db11.1518962109@mimosa>
Download mbox | patch
Permalink /patch/28088/
State Accepted
Headers show

Comments

Yuya Nishihara - Feb. 18, 2018, 1:55 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1518959531 -32400
#      Sun Feb 18 22:12:11 2018 +0900
# Node ID 20fd00ae43f25ab4db11bafc909a6a659bb74cbe
# Parent  685bcdd236b592bb7c84290268decfb675bbd5ca
url: show full url of proxy server in debug message

This only fixes the debug message spotted by issue5796.

Patch

diff --git a/mercurial/url.py b/mercurial/url.py
--- a/mercurial/url.py
+++ b/mercurial/url.py
@@ -126,8 +126,7 @@  class proxyhandler(urlreq.proxyhandler):
 
             proxyurl = str(proxy)
             proxies = {'http': proxyurl, 'https': proxyurl}
-            ui.debug('proxying through http://%s:%s\n' %
-                      (proxy.host, proxy.port))
+            ui.debug('proxying through %s\n' % util.hidepassword(proxyurl))
         else:
             proxies = {}