comparison mercurial/hg.py @ 1945:dec6d3c13dbf

new type of repo: bundle://path/to/repo+/path/to/bundlename You can use it to pull only some changeset from an uncompressed bundle.
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 13 Mar 2006 03:56:36 +0100
parents c81d264cd17d
children d90a9d7c7d4d
comparison
equal deleted inserted replaced
1944:fdf40c9b3306 1945:dec6d3c13dbf
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)