equal
deleted
inserted
replaced
6 # of the GNU General Public License, incorporated herein by reference. |
6 # of the GNU General Public License, incorporated herein by reference. |
7 |
7 |
8 from node import * |
8 from node import * |
9 from repo import * |
9 from repo import * |
10 from demandload import * |
10 from demandload import * |
11 demandload(globals(), "localrepo httprepo sshrepo statichttprepo") |
11 demandload(globals(), "localrepo bundlerepo httprepo sshrepo statichttprepo") |
12 |
12 |
13 def repository(ui, path=None, create=0): |
13 def repository(ui, path=None, create=0): |
14 if path: |
14 if path: |
15 if path.startswith("http://"): |
15 if path.startswith("http://"): |
16 return httprepo.httprepository(ui, path) |
16 return httprepo.httprepository(ui, path) |
22 if path.startswith("old-http://"): |
22 if path.startswith("old-http://"): |
23 return statichttprepo.statichttprepository( |
23 return statichttprepo.statichttprepository( |
24 ui, path.replace("old-http://", "http://")) |
24 ui, path.replace("old-http://", "http://")) |
25 if path.startswith("ssh://"): |
25 if path.startswith("ssh://"): |
26 return sshrepo.sshrepository(ui, path) |
26 return sshrepo.sshrepository(ui, path) |
|
27 if path.startswith("bundle://"): |
|
28 path = path[9:] |
|
29 s = path.split("+", 1) |
|
30 if len(s) == 1: |
|
31 repopath, bundlename = "", s[0] |
|
32 else: |
|
33 repopath, bundlename = s |
|
34 return bundlerepo.bundlerepository(ui, repopath, bundlename) |
27 |
35 |
28 return localrepo.localrepository(ui, path, create) |
36 return localrepo.localrepository(ui, path, create) |