Patchwork [03,of,11] test-pattern: register current the bundlecaps string

login
register
mail settings
Submitter Boris Feld
Date Nov. 13, 2017, 11:04 a.m.
Message ID <6e8aa2adeceaa523f214.1510571093@FB>
Download mbox | patch
Permalink /patch/25506/
State Superseded
Headers show

Comments

Boris Feld - Nov. 13, 2017, 11:04 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1509860620 -3600
#      Sun Nov 05 06:43:40 2017 +0100
# Node ID 6e8aa2adeceaa523f214b79970df6471d728faf9
# Parent  aaaceee35dc84c5a5a7f3287d2605dd9d5f27688
# EXP-Topic better-substitute
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 6e8aa2adecea
test-pattern: register current the bundlecaps string

The bundle capabilites sent with every getbundle commands. Every time the
protocol is updated, that string is altered. We get that string replace by
$USUAL_BUNDLE_CAPS$ so that we only have to change the substitution whenever
this happens.

Patch

diff --git a/tests/common-pattern.py b/tests/common-pattern.py
--- a/tests/common-pattern.py
+++ b/tests/common-pattern.py
@@ -6,4 +6,17 @@  substitutions = [
     (br'zstd,zlib,none,bzip2',
      br'$USUAL_COMPRESSIONS$'
     ),
+    # capabilities sent through http
+    (br'bundlecaps=HG20%2Cbundle2%3DHG20%250A'
+     br'changegroup%253D01%252C02%250A'
+     br'digests%253Dmd5%252Csha1%252Csha512%250A'
+     br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A'
+     br'hgtagsfnodes%250A'
+     br'listkeys%250A'
+     br'phases%253Dheads%250A'
+     br'pushkey%250A'
+     br'remote-changegroup%253Dhttp%252Chttps',
+     # (the replacement patterns)
+     br'$USUAL_BUNDLE_CAPS$'
+    ),
 ]