Patchwork D1924: exchange: make stream bundle part deterministic

login
register
mail settings
Submitter phabricator
Date Jan. 21, 2018, 12:45 a.m.
Message ID <differential-rev-PHID-DREV-tgeqsxylajpbrhpeswwe-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27010/
State Superseded
Headers show

Comments

phabricator - Jan. 21, 2018, 12:45 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  repo.requirements is a set. We need to sort it so the part
  content is deterministic.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1924

AFFECTED FILES
  mercurial/exchange.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -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)