[PATCH] revsets: added authuri when login information is requested (issue3209)

Lucas Moscovicz lmoscovicz at fb.com
Wed Jan 15 18:54:09 CST 2014

# HG changeset patch
# User Lucas Moscovicz <lmoscovicz at fb.com>
# Date 1389833180 28800
#      Wed Jan 15 16:46:20 2014 -0800
# Node ID c7b43e384d85c17c7e90326ff9c4f6d5d907c196
# Parent  f694cd81b600b65d23dcdc7a02cfd6a57dd1d018
revsets: added authuri when login information is requested (issue3209)

When users are using a revset they can get multiple password prompts.
This prompts have no extra information about which password is being requested
so I added the authuri to the prompt to make it recognizable.

diff --git a/mercurial/url.py b/mercurial/url.py
--- a/mercurial/url.py
+++ b/mercurial/url.py
@@ -35,7 +35,8 @@
             if not self.ui.interactive():
                 raise util.Abort(_('http authorization required'))
-            self.ui.write(_("http authorization required\n"))
+            self.ui.write(_("http authorization required for %s\n") %
+                          urllib.splitquery(authuri)[0])
             self.ui.write(_("realm: %s\n") % realm)
             if user:
                 self.ui.write(_("user: %s\n") % user)

More information about the Mercurial-devel mailing list