mercurial/httppeer.py
changeset 37556 b77aa48ba690
parent 37555 930c433eb311
child 37558 8a73132214a3
equal deleted inserted replaced
37555:930c433eb311 37556:b77aa48ba690
   208         headers[r'Content-Type'] = r'application/mercurial-0.1'
   208         headers[r'Content-Type'] = r'application/mercurial-0.1'
   209 
   209 
   210     # Tell the server we accept application/mercurial-0.2 and multiple
   210     # Tell the server we accept application/mercurial-0.2 and multiple
   211     # compression formats if the server is capable of emitting those
   211     # compression formats if the server is capable of emitting those
   212     # payloads.
   212     # payloads.
   213     protoparams = {'partial-pull'}
   213     # Note: Keep this set empty by default, as client advertisement of
       
   214     # protocol parameters should only occur after the handshake.
       
   215     protoparams = set()
   214 
   216 
   215     mediatypes = set()
   217     mediatypes = set()
   216     if caps is not None:
   218     if caps is not None:
   217         mt = capablefn('httpmediatype')
   219         mt = capablefn('httpmediatype')
   218         if mt:
   220         if mt:
   219             protoparams.add('0.1')
   221             protoparams.add('0.1')
   220             mediatypes = set(mt.split(','))
   222             mediatypes = set(mt.split(','))
       
   223 
       
   224         protoparams.add('partial-pull')
   221 
   225 
   222     if '0.2tx' in mediatypes:
   226     if '0.2tx' in mediatypes:
   223         protoparams.add('0.2')
   227         protoparams.add('0.2')
   224 
   228 
   225     if '0.2tx' in mediatypes and capablefn('compression'):
   229     if '0.2tx' in mediatypes and capablefn('compression'):