[PATCH] url: fix bug in passwordmgr related to auth configuration

Sune Foldager cryo at cyanite.org
Mon May 11 00:58:31 CDT 2009


# HG changeset patch
# User Sune Foldager <cryo at cyanite.org>
# Date 1242021313 -7200
# Node ID 9d72812fcf11a44818c9ca9281d88f32dae66b0a
# Parent  493d23d923eac33073f8ff2eb93d0d1c78a625d9
url: fix bug in passwordmgr related to auth configuration

Usernames given as part of the URL would be ignored.
This bug was introduced in 89c80c3dc5842d609e9ba13f08fd2cf7f127c25a

diff --git a/mercurial/url.py b/mercurial/url.py
--- a/mercurial/url.py
+++ b/mercurial/url.py
@@ -108,7 +108,8 @@
             self._writedebug(user, passwd)
             return (user, passwd)
 
-        user, passwd = self._readauthtoken(authuri)
+        if not user:
+            user, passwd = self._readauthtoken(authuri)
         if not user or not passwd:
             if not self.ui.interactive():
                 raise util.Abort(_('http authorization required'))


More information about the Mercurial-devel mailing list