changeset 915:24a31f46fa13

Let hg paths work outside of repositories
author mpm@selenic.com
date Tue, 16 Aug 2005 13:52:28 -0800
parents 8c850b81798b
children fe094cca9915
files mercurial/commands.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Aug 16 10:44:04 2005 -0800
+++ b/mercurial/commands.py	Tue Aug 16 13:52:28 2005 -0800
@@ -855,8 +855,13 @@
         if n != hg.nullid:
             show_changeset(ui, repo, changenode=n)
 
-def paths(ui, repo, search = None):
+def paths(ui, search = None):
     """show path or list of available paths"""
+    try:
+        repo = hg.repository(ui=ui)
+    except:
+        pass
+
     if search:
         for name, path in ui.configitems("paths"):
             if name == search:
@@ -1373,7 +1378,7 @@
               ('', 'time', None, 'time how long the command takes'),
              ]
 
-norepo = "clone init version help debugindex debugindexdot"
+norepo = "clone init version help debugindex debugindexdot paths"
 
 def find(cmd):
     for e in table.keys():