[PATCH 07 of 14 V3] clone: allow bundle2's stream clone with 'server.disablefullbundle'
Boris Feld
boris.feld at octobus.net
Fri Jan 19 23:47:12 UTC 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1516203512 -3600
# Wed Jan 17 16:38:32 2018 +0100
# Node ID e0d5763061cc551ea34f748631fc9985836885a3
# Parent 752abe0317e37feb6d837b2b17e0d63fa10fd63d
# EXP-Topic b2-stream
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r e0d5763061cc
clone: allow bundle2's stream clone with 'server.disablefullbundle'
The previous check was a bit too strict and would not recognize a get bundle
not requesting changegroup.
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -855,10 +855,11 @@ def getbundle(repo, proto, others):
if repo.ui.configbool('server', 'disablefullbundle'):
# Check to see if this is a full clone.
clheads = set(repo.changelog.heads())
+ changegroup = opts.get('cg', True)
heads = set(opts.get('heads', set()))
common = set(opts.get('common', set()))
common.discard(nullid)
- if not common and clheads == heads:
+ if changegroup and not common and clheads == heads:
raise error.Abort(
_('server has pull-based clones disabled'),
hint=_('remove --pull if specified or upgrade Mercurial'))
More information about the Mercurial-devel
mailing list