mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
new type of repo: bundle://path/to/repo+/path/to/bundlename
You can use it to pull only some changeset from an uncompressed bundle.
This commit is contained in:
parent
f4629445c7
commit
1538c06f8e
@ -8,7 +8,7 @@
|
||||
from node import *
|
||||
from repo import *
|
||||
from demandload import *
|
||||
demandload(globals(), "localrepo httprepo sshrepo statichttprepo")
|
||||
demandload(globals(), "localrepo bundlerepo httprepo sshrepo statichttprepo")
|
||||
|
||||
def repository(ui, path=None, create=0):
|
||||
if path:
|
||||
@ -24,5 +24,13 @@ def repository(ui, path=None, create=0):
|
||||
ui, path.replace("old-http://", "http://"))
|
||||
if path.startswith("ssh://"):
|
||||
return sshrepo.sshrepository(ui, path)
|
||||
if path.startswith("bundle://"):
|
||||
path = path[9:]
|
||||
s = path.split("+", 1)
|
||||
if len(s) == 1:
|
||||
repopath, bundlename = "", s[0]
|
||||
else:
|
||||
repopath, bundlename = s
|
||||
return bundlerepo.bundlerepository(ui, repopath, bundlename)
|
||||
|
||||
return localrepo.localrepository(ui, path, create)
|
||||
|
Loading…
Reference in New Issue
Block a user