diff tests/test-bundle2.t @ 20809:b93bb639451a

bundle2: support for bundling parameter value Parameter can now have a value. We use a `<name>=<value>` form inspired from capabilities. There is still no kind of escaping in the name or value, yet.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 18 Mar 2014 16:05:06 -0700
parents c5aaeca0cfbf
children 47293877b54c
line wrap: on
line diff
--- a/tests/test-bundle2.t	Thu Mar 20 13:18:34 2014 -0700
+++ b/tests/test-bundle2.t	Tue Mar 18 16:05:06 2014 -0700
@@ -21,7 +21,9 @@
   >     """write a bundle2 container on standard ouput"""
   >     bundler = bundle2.bundle20()
   >     for p in opts['param']:
-  >         bundler.addparam(p)
+  >         p = p.split('=', 1)
+  >         bundler.addparam(*p)
+  > 
   >     for chunk in bundler.getchunks():
   >         ui.write(chunk)
   > 
@@ -110,3 +112,11 @@
   - meal
   parts count:   0
 
+advisory parameters, with value
+-------------------------------
+
+Test generation
+
+  $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants'
+  HG20\x00\x1ccaution meal=vegan elephants\x00\x00 (no-eol) (esc)
+