# HG changeset patch # User Pierre-Yves David # Date 2014-03-19 00:43:08 # Node ID e2f908773754d02f20b5a21a674bb9bf343cbdb6 # Parent 9785c3f8f59865df934550e667a486ef79e8eb15 bundle2: urlunquote stream parameter name and value during unbundling Align to new escaping used during bundling. diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -153,6 +153,7 @@ class unbundle20(object): if paramssize: for p in self._readexact(paramssize).split(' '): p = p.split('=', 1) + p = [urllib.unquote(i) for i in p] if len(p) < 2: p.append(None) params[p[0]] = p[1] diff --git a/tests/test-bundle2.t b/tests/test-bundle2.t --- a/tests/test-bundle2.t +++ b/tests/test-bundle2.t @@ -140,3 +140,12 @@ Test generation $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple HG20\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00 (no-eol) (esc) + +Test unbundling + + $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | hg unbundle2 + options count: 2 + - e|! 7/ + babar%#==tutu + - simple + parts count: 0