Hide URL passwords in hg paths output.
authorBrendan Cully <brendan@kublai.com>
Tue, 11 Mar 2008 16:28:58 -0700
changeset 6234 a47462264906
parent 6233 14a4fdf9037f
child 6235 d16798000be0
Hide URL passwords in hg paths output.
mercurial/commands.py
--- a/mercurial/commands.py	Tue Mar 11 16:04:25 2008 -0700
+++ b/mercurial/commands.py	Tue Mar 11 16:28:58 2008 -0700
@@ -1954,13 +1954,13 @@
     if search:
         for name, path in ui.configitems("paths"):
             if name == search:
-                ui.write("%s\n" % path)
+                ui.write("%s\n" % util.hidepassword(path))
                 return
         ui.warn(_("not found!\n"))
         return 1
     else:
         for name, path in ui.configitems("paths"):
-            ui.write("%s = %s\n" % (name, path))
+            ui.write("%s = %s\n" % (name, util.hidepassword(path)))
 
 def postincoming(ui, repo, modheads, optupdate, checkout):
     if modheads == 0: