diff --git a/hgext/clonebundles.py b/hgext/clonebundles.py --- a/hgext/clonebundles.py +++ b/hgext/clonebundles.py @@ -211,18 +211,6 @@ def capabilities(orig, repo, proto): return caps -@wireproto.wireprotocommand('clonebundles', '') -def bundles(repo, proto): - """Server command for returning info for available bundles to seed clones. - - Clients will parse this response and determine what bundle to fetch. - - Other extensions may wrap this command to filter or dynamically emit - data depending on the request. e.g. you could advertise URLs for - the closest data center given the client's IP address. - """ - return repo.opener.tryread('clonebundles.manifest') - @exchange.getbundle2partsgenerator('clonebundlesadvertise', 0) def advertiseclonebundlespart(bundler, repo, source, bundlecaps=None, b2caps=None, heads=None, common=None, diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -549,6 +549,17 @@ def branches(repo, proto, nodes): r.append(encodelist(b) + "\n") return "".join(r) +@wireprotocommand('clonebundles', '') +def clonebundles(repo, proto): + """Server command for returning info for available bundles to seed clones. + + Clients will parse this response and determine what bundle to fetch. + + Extensions may wrap this command to filter or dynamically emit data + depending on the request. e.g. you could advertise URLs for the closest + data center given the client's IP address. + """ + return repo.opener.tryread('clonebundles.manifest') wireprotocaps = ['lookup', 'changegroupsubset', 'branchmap', 'pushkey', 'known', 'getbundle', 'unbundlehash', 'batch'] diff --git a/tests/test-clonebundles.t b/tests/test-clonebundles.t --- a/tests/test-clonebundles.t +++ b/tests/test-clonebundles.t @@ -224,6 +224,18 @@ by old clients. searching for changes no changes found +Feature works over SSH + + $ hg clone -U -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone + applying clone bundle from http://localhost:$HGPORT1/full.hg + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files + finished applying clone bundle + searching for changes + no changes found + Entry with unknown BUNDLESPEC is filtered and not used $ cat > server/.hg/clonebundles.manifest << EOF