comparison mercurial/wireproto.py @ 37536:2003da12f49b

wireproto: only expose "clonebundles" to version 1 transports This may make a comeback in wire protocol version 2. The feature definitely needs to be carried forward. But at this juncture, I'm flirting with the idea of implementing this via a "redirect" mechanism at the command response level itself rather than something that requires one-off client support for querying and handling. i.e. I want to make it so servers can say "fetch this first and then come back" and clients handle that automatically. This would not only support clone bundles, but would also support piece-meal "pull bundles." Whatever happens, we can deal with it down the road. Differential Revision: https://phab.mercurial-scm.org/D3203
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 06 Apr 2018 17:21:16 -0700
parents 69e46c1834ac
children be5d4749edc0
comparison
equal deleted inserted replaced
37535:69e46c1834ac 37536:2003da12f49b
863 for b in repo.branches(nodes): 863 for b in repo.branches(nodes):
864 r.append(encodelist(b) + "\n") 864 r.append(encodelist(b) + "\n")
865 865
866 return wireprototypes.bytesresponse(''.join(r)) 866 return wireprototypes.bytesresponse(''.join(r))
867 867
868 @wireprotocommand('clonebundles', '', permission='pull') 868 @wireprotocommand('clonebundles', '', permission='pull',
869 transportpolicy=POLICY_V1_ONLY)
869 def clonebundles(repo, proto): 870 def clonebundles(repo, proto):
870 """Server command for returning info for available bundles to seed clones. 871 """Server command for returning info for available bundles to seed clones.
871 872
872 Clients will parse this response and determine what bundle to fetch. 873 Clients will parse this response and determine what bundle to fetch.
873 874