mercurial/commands.py
changeset 915 24a31f46fa13
parent 913 46581ad4bd27
child 917 7f3f55903496
equal deleted inserted replaced
914:8c850b81798b 915:24a31f46fa13
   853 
   853 
   854     for n in p:
   854     for n in p:
   855         if n != hg.nullid:
   855         if n != hg.nullid:
   856             show_changeset(ui, repo, changenode=n)
   856             show_changeset(ui, repo, changenode=n)
   857 
   857 
   858 def paths(ui, repo, search = None):
   858 def paths(ui, search = None):
   859     """show path or list of available paths"""
   859     """show path or list of available paths"""
       
   860     try:
       
   861         repo = hg.repository(ui=ui)
       
   862     except:
       
   863         pass
       
   864 
   860     if search:
   865     if search:
   861         for name, path in ui.configitems("paths"):
   866         for name, path in ui.configitems("paths"):
   862             if name == search:
   867             if name == search:
   863                 ui.write("%s\n" % path)
   868                 ui.write("%s\n" % path)
   864                 return
   869                 return
  1371               ('y', 'noninteractive', None, 'run non-interactively'),
  1376               ('y', 'noninteractive', None, 'run non-interactively'),
  1372               ('', 'version', None, 'output version information and exit'),
  1377               ('', 'version', None, 'output version information and exit'),
  1373               ('', 'time', None, 'time how long the command takes'),
  1378               ('', 'time', None, 'time how long the command takes'),
  1374              ]
  1379              ]
  1375 
  1380 
  1376 norepo = "clone init version help debugindex debugindexdot"
  1381 norepo = "clone init version help debugindex debugindexdot paths"
  1377 
  1382 
  1378 def find(cmd):
  1383 def find(cmd):
  1379     for e in table.keys():
  1384     for e in table.keys():
  1380         if re.match("(%s)$" % e, cmd):
  1385         if re.match("(%s)$" % e, cmd):
  1381             return e, table[e]
  1386             return e, table[e]