D3933: pullbundle: fix handling of gzip bundlespecs
joerg.sonnenberger (Joerg Sonnenberger)
phabricator at mercurial-scm.org
Sat Jul 14 05:17:06 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7e4a856a4f05: pullbundle: fix handling of gzip bundlespecs (authored by joerg.sonnenberger, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3933?vs=9569&id=9591
REVISION DETAIL
https://phab.mercurial-scm.org/D3933
AFFECTED FILES
mercurial/wireprotov1server.py
tests/test-pull-bundle.t
CHANGE DETAILS
diff --git a/tests/test-pull-bundle.t b/tests/test-pull-bundle.t
--- a/tests/test-pull-bundle.t
+++ b/tests/test-pull-bundle.t
@@ -46,9 +46,9 @@
$ hg bundle --base 1 -r 2 .hg/2.hg
1 changesets found
$ cat <<EOF > .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) (?)
diff --git a/mercurial/wireprotov1server.py b/mercurial/wireprotov1server.py
--- a/mercurial/wireprotov1server.py
+++ b/mercurial/wireprotov1server.py
@@ -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
To: joerg.sonnenberger, #hg-reviewers, durin42
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list