--- a/mercurial/wireproto.py Fri Apr 06 22:16:11 2018 +0200
+++ b/mercurial/wireproto.py Fri Apr 06 22:22:19 2018 +0200
@@ -896,7 +896,8 @@
# `_capabilities` instead.
@wireprotocommand('capabilities', permission='pull')
def capabilities(repo, proto):
- return wireprototypes.bytesresponse(' '.join(_capabilities(repo, proto)))
+ caps = _capabilities(repo, proto)
+ return wireprototypes.bytesresponse(' '.join(sorted(caps)))
@wireprotocommand('changegroup', 'roots', transportpolicy=POLICY_V1_ONLY,
permission='pull')