Show More
@@ -211,18 +211,6 b' def capabilities(orig, repo, proto):' | |||
|
211 | 211 | |
|
212 | 212 | return caps |
|
213 | 213 | |
|
214 | @wireproto.wireprotocommand('clonebundles', '') | |
|
215 | def bundles(repo, proto): | |
|
216 | """Server command for returning info for available bundles to seed clones. | |
|
217 | ||
|
218 | Clients will parse this response and determine what bundle to fetch. | |
|
219 | ||
|
220 | Other extensions may wrap this command to filter or dynamically emit | |
|
221 | data depending on the request. e.g. you could advertise URLs for | |
|
222 | the closest data center given the client's IP address. | |
|
223 | """ | |
|
224 | return repo.opener.tryread('clonebundles.manifest') | |
|
225 | ||
|
226 | 214 | @exchange.getbundle2partsgenerator('clonebundlesadvertise', 0) |
|
227 | 215 | def advertiseclonebundlespart(bundler, repo, source, bundlecaps=None, |
|
228 | 216 | b2caps=None, heads=None, common=None, |
@@ -549,6 +549,17 b' def branches(repo, proto, nodes):' | |||
|
549 | 549 | r.append(encodelist(b) + "\n") |
|
550 | 550 | return "".join(r) |
|
551 | 551 | |
|
552 | @wireprotocommand('clonebundles', '') | |
|
553 | def clonebundles(repo, proto): | |
|
554 | """Server command for returning info for available bundles to seed clones. | |
|
555 | ||
|
556 | Clients will parse this response and determine what bundle to fetch. | |
|
557 | ||
|
558 | Extensions may wrap this command to filter or dynamically emit data | |
|
559 | depending on the request. e.g. you could advertise URLs for the closest | |
|
560 | data center given the client's IP address. | |
|
561 | """ | |
|
562 | return repo.opener.tryread('clonebundles.manifest') | |
|
552 | 563 | |
|
553 | 564 | wireprotocaps = ['lookup', 'changegroupsubset', 'branchmap', 'pushkey', |
|
554 | 565 | 'known', 'getbundle', 'unbundlehash', 'batch'] |
@@ -224,6 +224,18 b' by old clients.' | |||
|
224 | 224 | searching for changes |
|
225 | 225 | no changes found |
|
226 | 226 | |
|
227 | Feature works over SSH | |
|
228 | ||
|
229 | $ hg clone -U -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone | |
|
230 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
|
231 | adding changesets | |
|
232 | adding manifests | |
|
233 | adding file changes | |
|
234 | added 2 changesets with 2 changes to 2 files | |
|
235 | finished applying clone bundle | |
|
236 | searching for changes | |
|
237 | no changes found | |
|
238 | ||
|
227 | 239 | Entry with unknown BUNDLESPEC is filtered and not used |
|
228 | 240 | |
|
229 | 241 | $ cat > server/.hg/clonebundles.manifest << EOF |
General Comments 0
You need to be logged in to leave comments.
Login now