# HG changeset patch # User mpm@selenic.com # Date 1124229148 28800 # Node ID 24a31f46fa13d97bf4de8ffbc5e64058d0453f40 # Parent 8c850b81798bcbcb2ebbb325ff813d397f2bc2c7 Let hg paths work outside of repositories diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -855,8 +855,13 @@ def parents(ui, repo, rev=None): 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 @@ globalopts = [('v', 'verbose', None, 've ('', '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():