[PATCH 2 of 5 mainline] stream: sort stream capability before serialisation

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Nov 12 13:29:38 CST 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1445336922 -7200
#      Tue Oct 20 12:28:42 2015 +0200
# Node ID f994867ca545ad8589297fb2d934e6506c70911a
# Parent  8aea4597c85f4595c9ee3d2117417fe2915d8eac
# EXP-Topic generaldelta
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r f994867ca545
stream: sort stream capability before serialisation

We want that capability to be stable in our testing. This is currently not an
issue because the set is size 1, but this will be once general delta related
data get in there.

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -583,11 +583,11 @@ def _capabilities(repo, proto):
         # if our local revlogs are just revlogv1, add 'stream' cap
         if not requiredformats - set(('revlogv1',)):
             caps.append('stream')
         # otherwise, add 'streamreqs' detailing our local revlog format
         else:
-            caps.append('streamreqs=%s' % ','.join(requiredformats))
+            caps.append('streamreqs=%s' % ','.join(sorted(requiredformats)))
     if repo.ui.configbool('experimental', 'bundle2-advertise', True):
         capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo))
         caps.append('bundle2=' + urllib.quote(capsblob))
     caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority))
     caps.append(


More information about the Mercurial-devel mailing list