[PATCH 1 of 5] paths: drop ui.status label from output of "hg paths name"

Yuya Nishihara yuya at tcha.org
Sat Jan 9 09:45:41 UTC 2016


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1450011240 -32400
#      Sun Dec 13 21:54:00 2015 +0900
# Node ID 16099841acaa4fa42dffa994b9ac9e16c89a43be
# Parent  0db7943a4e1f843814865dc1b2cb22b994acc74f
paths: drop ui.status label from output of "hg paths name"

We just need to not print path if --quiet. ui.status label is unwanted.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5415,7 +5415,8 @@ def paths(ui, repo, search=None):
     if search:
         for name, path in sorted(ui.paths.iteritems()):
             if name == search:
-                ui.status("%s\n" % util.hidepassword(path.rawloc))
+                if not ui.quiet:
+                    ui.write("%s\n" % util.hidepassword(path.rawloc))
                 return
         if not ui.quiet:
             ui.warn(_("not found!\n"))


More information about the Mercurial-devel mailing list