diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -13,7 +13,8 @@ demandload(globals(), "localrepo bundler demandload(globals(), "errno lock os shutil util") def _local(path): - return os.path.isfile(util.drop_scheme('file', path)) and bundlerepo or localrepo + return (os.path.isfile(path and util.drop_scheme('file', path)) and + bundlerepo or localrepo) schemes = { 'bundle': bundlerepo,