comparison mercurial/commands.py @ 27724:c36fa631cb6e

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.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 13 Dec 2015 21:54:00 +0900
parents edd2615ad226
children 64ee5866e107
comparison
equal deleted inserted replaced
27722:edd2615ad226 27724:c36fa631cb6e
5398 Returns 0 on success. 5398 Returns 0 on success.
5399 """ 5399 """
5400 if search: 5400 if search:
5401 for name, path in sorted(ui.paths.iteritems()): 5401 for name, path in sorted(ui.paths.iteritems()):
5402 if name == search: 5402 if name == search:
5403 ui.status("%s\n" % util.hidepassword(path.rawloc)) 5403 if not ui.quiet:
5404 ui.write("%s\n" % util.hidepassword(path.rawloc))
5404 return 5405 return
5405 if not ui.quiet: 5406 if not ui.quiet:
5406 ui.warn(_("not found!\n")) 5407 ui.warn(_("not found!\n"))
5407 return 1 5408 return 1
5408 else: 5409 else: