mercurial/wireproto.py
changeset 35760 133a678673cb
parent 35759 c24dad55ac19
child 35782 9d249f3de730
equal deleted inserted replaced
35759:c24dad55ac19 35760:133a678673cb
   864 
   864 
   865     try:
   865     try:
   866         if repo.ui.configbool('server', 'disablefullbundle'):
   866         if repo.ui.configbool('server', 'disablefullbundle'):
   867             # Check to see if this is a full clone.
   867             # Check to see if this is a full clone.
   868             clheads = set(repo.changelog.heads())
   868             clheads = set(repo.changelog.heads())
       
   869             changegroup = opts.get('cg', True)
   869             heads = set(opts.get('heads', set()))
   870             heads = set(opts.get('heads', set()))
   870             common = set(opts.get('common', set()))
   871             common = set(opts.get('common', set()))
   871             common.discard(nullid)
   872             common.discard(nullid)
   872             if not common and clheads == heads:
   873             if changegroup and not common and clheads == heads:
   873                 raise error.Abort(
   874                 raise error.Abort(
   874                     _('server has pull-based clones disabled'),
   875                     _('server has pull-based clones disabled'),
   875                     hint=_('remove --pull if specified or upgrade Mercurial'))
   876                     hint=_('remove --pull if specified or upgrade Mercurial'))
   876 
   877 
   877         chunks = exchange.getbundlechunks(repo, 'serve',
   878         chunks = exchange.getbundlechunks(repo, 'serve',