# HG changeset patch # User Joerg Sonnenberger # Date 1531402143 -7200 # Node ID 7e4a856a4f0583ce1e348afc957b4449acd0bcbb # Parent 2a227782e75426a3e4408273a9a4eebe79dfdcea pullbundle: fix handling of gzip bundlespecs Differential Revision: https://phab.mercurial-scm.org/D3933 diff -r 2a227782e754 -r 7e4a856a4f05 mercurial/wireprotov1server.py --- a/mercurial/wireprotov1server.py Wed Jul 11 16:44:33 2018 -0700 +++ b/mercurial/wireprotov1server.py Thu Jul 12 15:29:03 2018 +0200 @@ -353,7 +353,9 @@ common_anc = cl.ancestors([cl.rev(rev) for rev in common], inclusive=True) compformats = clientcompressionsupport(proto) for entry in res: - if 'COMPRESSION' in entry and entry['COMPRESSION'] not in compformats: + comp = entry.get('COMPRESSION') + altcomp = util.compengines._bundlenames.get(comp) + if comp and comp not in compformats and altcomp not in compformats: continue # No test yet for VERSION, since V2 is supported by any client # that advertises partial pulls diff -r 2a227782e754 -r 7e4a856a4f05 tests/test-pull-bundle.t --- a/tests/test-pull-bundle.t Wed Jul 11 16:44:33 2018 -0700 +++ b/tests/test-pull-bundle.t Thu Jul 12 15:29:03 2018 +0200 @@ -46,9 +46,9 @@ $ hg bundle --base 1 -r 2 .hg/2.hg 1 changesets found $ cat < .hg/pullbundles.manifest - > 2.hg heads=effea6de0384e684f44435651cb7bd70b8735bd4 bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa - > 1.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa - > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa + > 2.hg BUNDLESPEC=none-v2 heads=effea6de0384e684f44435651cb7bd70b8735bd4 bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa + > 1.hg BUNDLESPEC=bzip2-v2 heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa + > 0.hg BUNDLESPEC=gzip-v2 heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa > EOF $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?)