[PATCH] Hide URL passwords in hg paths output
Brendan Cully
brendan at kublai.com
Tue Mar 11 18:36:01 CDT 2008
# HG changeset patch
# User Brendan Cully <brendan at kublai.com>
# Date 1205278138 25200
# Node ID 13c63a7e07189dbed480ce721f83ec15e668f234
# Parent bd61e44eb2ccbadd5f64e27900c8c1861077c0c4
Hide URL passwords in hg paths output.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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:
More information about the Mercurial-devel
mailing list