# HG changeset patch # User Brendan Cully # Date 1159560036 25200 # Node ID 705e30c0a230136c38cd9fdf91767e7601fb6dc9 # Parent 182bdd589cbe9a3045a3a10769cb8de33c7c24a1 Make hg.repository work with no path argument diff -r 182bdd589cbe -r 705e30c0a230 mercurial/hg.py --- a/mercurial/hg.py Fri Sep 29 21:24:45 2006 +0200 +++ b/mercurial/hg.py Fri Sep 29 13:00:36 2006 -0700 @@ -14,7 +14,7 @@ demandload(globals(), "errno lock os shutil util merge@_merge verify@_verify") def _local(path): - return (os.path.isfile(path and util.drop_scheme('file', path)) and + return (os.path.isfile(util.drop_scheme('file', path)) and bundlerepo or localrepo) schemes = { @@ -51,7 +51,7 @@ repo_setup_hooks = [] -def repository(ui, path=None, create=False): +def repository(ui, path='', create=False): """return a repository object for the specified path""" repo = _lookup(path).instance(ui, path, create) for hook in repo_setup_hooks: