tests/wireprotohelpers.sh
changeset 37540 693cb3768943
parent 37483 61e405fb6372
child 37718 ad1c07008e0b
--- a/tests/wireprotohelpers.sh	Mon Apr 09 11:54:31 2018 -0700
+++ b/tests/wireprotohelpers.sh	Mon Apr 09 11:57:12 2018 -0700
@@ -16,12 +16,22 @@
 )
 
 @wireproto.wireprotocommand('customreadonly', permission='pull')
-def customreadonly(repo, proto):
+def customreadonlyv1(repo, proto):
+    return wireprototypes.bytesresponse(b'customreadonly bytes response')
+
+@wireproto.wireprotocommand('customreadonly', permission='pull',
+                            transportpolicy=wireproto.POLICY_V2_ONLY)
+def customreadonlyv2(repo, proto):
     return wireprototypes.bytesresponse(b'customreadonly bytes response')
 
 @wireproto.wireprotocommand('customreadwrite', permission='push')
 def customreadwrite(repo, proto):
     return wireprototypes.bytesresponse(b'customreadwrite bytes response')
+
+@wireproto.wireprotocommand('customreadwrite', permission='push',
+                            transportpolicy=wireproto.POLICY_V2_ONLY)
+def customreadwritev2(repo, proto):
+    return wireprototypes.bytesresponse(b'customreadwrite bytes response')
 EOF
 
 cat >> $HGRCPATH << EOF