mercurial/wireproto.py
branchstable
changeset 30912 3d4afc2fdcd7
parent 30910 accaa04f951c
child 30914 f3807a135e43
equal deleted inserted replaced
30911:f3c5a8a4dfd0 30912:3d4afc2fdcd7
   832             raise KeyError('unknown getbundle option type %s'
   832             raise KeyError('unknown getbundle option type %s'
   833                            % keytype)
   833                            % keytype)
   834 
   834 
   835     if not bundle1allowed(repo, 'pull'):
   835     if not bundle1allowed(repo, 'pull'):
   836         if not exchange.bundle2requested(opts.get('bundlecaps')):
   836         if not exchange.bundle2requested(opts.get('bundlecaps')):
   837             return ooberror(bundle2required)
   837             if proto.name == 'http':
       
   838                 return ooberror(bundle2required)
       
   839             raise error.Abort(bundle2requiredmain,
       
   840                               hint=bundle2requiredhint)
   838 
   841 
   839     chunks = exchange.getbundlechunks(repo, 'serve', **opts)
   842     chunks = exchange.getbundlechunks(repo, 'serve', **opts)
   840     return streamres(gen=chunks, v1compressible=True)
   843     return streamres(gen=chunks, v1compressible=True)
   841 
   844 
   842 @wireprotocommand('heads')
   845 @wireprotocommand('heads')