diff mercurial/wireproto.py @ 37539:4a0d58d6faba

wireproto: only expose "getbundle" and "unbundle" to v1 transports These are the most complicated wire protocol commands. I don't want to deal with porting them just yet. Let's disable both of them on version 2 transports so we drive the final wedge between command handlers and start to evolve version 2 command handlers more. Differential Revision: https://phab.mercurial-scm.org/D3206
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 09 Apr 2018 11:54:31 -0700
parents 89fed81bbb6c
children 693cb3768943
line wrap: on
line diff
--- a/mercurial/wireproto.py	Fri Apr 06 17:48:07 2018 -0700
+++ b/mercurial/wireproto.py	Mon Apr 09 11:54:31 2018 -0700
@@ -1019,7 +1019,8 @@
             continue
     return None
 
-@wireprotocommand('getbundle', '*', permission='pull')
+@wireprotocommand('getbundle', '*', permission='pull',
+                  transportpolicy=POLICY_V1_ONLY)
 def getbundle(repo, proto, others):
     opts = options('getbundle', gboptsmap.keys(), others)
     for k, v in opts.iteritems():
@@ -1178,7 +1179,8 @@
     return wireprototypes.streamreslegacy(
         streamclone.generatev1wireproto(repo))
 
-@wireprotocommand('unbundle', 'heads', permission='push')
+@wireprotocommand('unbundle', 'heads', permission='push',
+                  transportpolicy=POLICY_V1_ONLY)
 def unbundle(repo, proto, heads):
     their_heads = decodelist(heads)