mercurial/commands.py
changeset 27727 1a6fd929056f
parent 27726 7e9dc8bbebf6
child 27728 294037159c64
equal deleted inserted replaced
27726:7e9dc8bbebf6 27727:1a6fd929056f
  5401         pathitems = [(name, path) for name, path in ui.paths.iteritems()
  5401         pathitems = [(name, path) for name, path in ui.paths.iteritems()
  5402                      if name == search]
  5402                      if name == search]
  5403     else:
  5403     else:
  5404         pathitems = sorted(ui.paths.iteritems())
  5404         pathitems = sorted(ui.paths.iteritems())
  5405 
  5405 
       
  5406     if ui.quiet:
       
  5407         namefmt = '%s\n'
       
  5408     else:
       
  5409         namefmt = '%s = '
       
  5410     showsubopts = not search and not ui.quiet
       
  5411 
  5406     for name, path in pathitems:
  5412     for name, path in pathitems:
  5407         if search and not ui.quiet:
  5413         if not search:
       
  5414             ui.write(namefmt % name)
       
  5415         if not ui.quiet:
  5408             ui.write("%s\n" % util.hidepassword(path.rawloc))
  5416             ui.write("%s\n" % util.hidepassword(path.rawloc))
  5409         if search:
  5417         for subopt, value in sorted(path.suboptions.items()):
  5410             continue
  5418             if showsubopts:
  5411         if ui.quiet:
       
  5412             ui.write("%s\n" % name)
       
  5413         else:
       
  5414             ui.write("%s = %s\n" % (name, util.hidepassword(path.rawloc)))
       
  5415             for subopt, value in sorted(path.suboptions.items()):
       
  5416                 ui.write('%s:%s = %s\n' % (name, subopt, value))
  5419                 ui.write('%s:%s = %s\n' % (name, subopt, value))
  5417 
  5420 
  5418     if search and not pathitems:
  5421     if search and not pathitems:
  5419         if not ui.quiet:
  5422         if not ui.quiet:
  5420             ui.warn(_("not found!\n"))
  5423             ui.warn(_("not found!\n"))