diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
index c24dad55ac190827808bd3445f56f2758b60a630_bWVyY3VyaWFsL3dpcmVwcm90by5weQ==..133a678673cb151958e1a01ff7b4c9ad7e5feecf_bWVyY3VyaWFsL3dpcmVwcm90by5weQ== 100644
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -866,6 +866,7 @@
         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)
@@ -869,7 +870,7 @@
             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'))