diff tests/test-bundle2-pushback.t @ 24686:e0e28e910fa3

bundle2: rename format, parts and config to final names It is finally time to freeze the bundle2 format! To do so we: - rename HG2Y to HG20, - drop "b2x:" prefix from all part names, - rename capability to "bundle2-exp" to "bundle2" - rename the hook flag from 'bundle2-exp' to 'bundle2'
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 09 Apr 2015 16:25:48 -0400
parents 743736fc7c41
children dc4daf028f9c
line wrap: on
line diff
--- a/tests/test-bundle2-pushback.t	Wed Apr 08 09:38:09 2015 -0700
+++ b/tests/test-bundle2-pushback.t	Thu Apr 09 16:25:48 2015 -0400
@@ -6,21 +6,21 @@
   > from mercurial import bundle2, pushkey, exchange, util
   > def _newhandlechangegroup(op, inpart):
   >     """This function wraps the changegroup part handler for getbundle.
-  >     It issues an additional b2x:pushkey part to send a new
+  >     It issues an additional pushkey part to send a new
   >     bookmark back to the client"""
   >     result = bundle2.handlechangegroup(op, inpart)
-  >     if 'b2x:pushback' in op.reply.capabilities:
+  >     if 'pushback' in op.reply.capabilities:
   >         params = {'namespace': 'bookmarks',
   >                   'key': 'new-server-mark',
   >                   'old': '',
   >                   'new': 'tip'}
   >         encodedparams = [(k, pushkey.encode(v)) for (k,v) in params.items()]
-  >         op.reply.newpart('b2x:pushkey', mandatoryparams=encodedparams)
+  >         op.reply.newpart('pushkey', mandatoryparams=encodedparams)
   >     else:
-  >         op.reply.newpart('b2x:output', data='pushback not enabled')
+  >         op.reply.newpart('output', data='pushback not enabled')
   >     return result
   > _newhandlechangegroup.params = bundle2.handlechangegroup.params
-  > bundle2.parthandlermapping['b2x:changegroup'] = _newhandlechangegroup
+  > bundle2.parthandlermapping['changegroup'] = _newhandlechangegroup
   > EOF
 
   $ cat >> $HGRCPATH <<EOF