exchange: make stream bundle part deterministic
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 20 Jan 2018 15:26:31 -0800
changeset 35784 08cc94dd3d3c
parent 35783 c97639ad6874
child 35785 ba15580e53d5
exchange: make stream bundle part deterministic repo.requirements is a set. We need to sort it so the part content is deterministic. Differential Revision: https://phab.mercurial-scm.org/D1924
mercurial/exchange.py
--- a/mercurial/exchange.py	Sat Jan 20 13:54:36 2018 -0800
+++ b/mercurial/exchange.py	Sat Jan 20 15:26:31 2018 -0800
@@ -1767,7 +1767,7 @@
     if not kwargs.get('stream', False):
         return
     filecount, bytecount, it = streamclone.generatev2(repo)
-    requirements = ' '.join(repo.requirements)
+    requirements = ' '.join(sorted(repo.requirements))
     part = bundler.newpart('stream', data=it)
     part.addparam('bytecount', '%d' % bytecount, mandatory=True)
     part.addparam('filecount', '%d' % filecount, mandatory=True)