Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 2768:b1b1aa6f275c
allow None for path of hg.repository
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Wed, 02 Aug 2006 12:46:00 -0700 |
parents | 386f04d6ecb3 |
children | 8cd3e19bf4a5 |
comparison
equal
deleted
inserted
replaced
2767:60683ab1ed33 | 2768:b1b1aa6f275c |
---|---|
11 from i18n import gettext as _ | 11 from i18n import gettext as _ |
12 demandload(globals(), "localrepo bundlerepo httprepo sshrepo statichttprepo") | 12 demandload(globals(), "localrepo bundlerepo httprepo sshrepo statichttprepo") |
13 demandload(globals(), "errno lock os shutil util") | 13 demandload(globals(), "errno lock os shutil util") |
14 | 14 |
15 def _local(path): | 15 def _local(path): |
16 return os.path.isfile(util.drop_scheme('file', path)) and bundlerepo or localrepo | 16 return (os.path.isfile(path and util.drop_scheme('file', path)) and |
17 bundlerepo or localrepo) | |
17 | 18 |
18 schemes = { | 19 schemes = { |
19 'bundle': bundlerepo, | 20 'bundle': bundlerepo, |
20 'file': _local, | 21 'file': _local, |
21 'hg': httprepo, | 22 'hg': httprepo, |