Make hg.repository work with no path argument
authorBrendan Cully <brendan@kublai.com>
Fri, 29 Sep 2006 13:00:36 -0700
changeset 3188 705e30c0a230
parent 3187 182bdd589cbe
child 3189 f3b939444c72
Make hg.repository work with no path argument
mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -14,7 +14,7 @@ demandload(globals(), "localrepo bundler
 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 @@ def islocal(repo):
 
 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: