diff tests/test-bundle-type.t @ 29592:37cccad55410

util: implement a deterministic __repr__ on sortdict `hg debugbundle` is calling repr() on bundle2 part params, which are now util.sortdict instances. Unfortunately, repr() doesn't appear to be deterministic for util.sortdict. So, we implement one. We include the type name because that's the common convention for __repr__ implementations. Having the type name in `hg debugbundle` is a bit ugly. But it's a debug command and I don't care enough to fix it.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 17 Jul 2016 15:10:30 -0700
parents 2370c66110cb
children 953839de96ab
line wrap: on
line diff
--- a/tests/test-bundle-type.t	Sun Jul 17 14:51:00 2016 -0700
+++ b/tests/test-bundle-type.t	Sun Jul 17 15:10:30 2016 -0700
@@ -52,7 +52,7 @@
   1 changesets found
   HG20\x00\x00 (esc)
   Stream params: {}
-  changegroup -- "{'version': '02'}"
+  changegroup -- "sortdict([('version', '02')])"
       c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
   none-v2
   
@@ -60,8 +60,8 @@
   searching for changes
   1 changesets found
   HG20\x00\x00 (esc)
-  Stream params: {'Compression': 'BZ'}
-  changegroup -- "{'version': '02'}"
+  Stream params: sortdict([('Compression', 'BZ')])
+  changegroup -- "sortdict([('version', '02')])"
       c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
   bzip2-v2
   
@@ -69,8 +69,8 @@
   searching for changes
   1 changesets found
   HG20\x00\x00 (esc)
-  Stream params: {'Compression': 'GZ'}
-  changegroup -- "{'version': '02'}"
+  Stream params: sortdict([('Compression', 'GZ')])
+  changegroup -- "sortdict([('version', '02')])"
       c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
   gzip-v2
   
@@ -79,7 +79,7 @@
   1 changesets found
   HG20\x00\x00 (esc)
   Stream params: {}
-  changegroup -- "{'version': '02'}"
+  changegroup -- "sortdict([('version', '02')])"
       c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
   none-v2
   
@@ -87,8 +87,8 @@
   searching for changes
   1 changesets found
   HG20\x00\x00 (esc)
-  Stream params: {'Compression': 'BZ'}
-  changegroup -- "{'version': '02'}"
+  Stream params: sortdict([('Compression', 'BZ')])
+  changegroup -- "sortdict([('version', '02')])"
       c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
   bzip2-v2