mercurial/wireproto.py
changeset 36069 957e773614d0
parent 36067 caca3ac2ac04
child 36070 90ca4986616c
equal deleted inserted replaced
36068:56fe8a3b2d52 36069:957e773614d0
  1021                         return ooberror(bundle2required)
  1021                         return ooberror(bundle2required)
  1022                     raise error.Abort(bundle2requiredmain,
  1022                     raise error.Abort(bundle2requiredmain,
  1023                                       hint=bundle2requiredhint)
  1023                                       hint=bundle2requiredhint)
  1024 
  1024 
  1025                 r = exchange.unbundle(repo, gen, their_heads, 'serve',
  1025                 r = exchange.unbundle(repo, gen, their_heads, 'serve',
  1026                                       proto._client())
  1026                                       proto.client())
  1027                 if util.safehasattr(r, 'addpart'):
  1027                 if util.safehasattr(r, 'addpart'):
  1028                     # The return looks streamable, we are in the bundle2 case
  1028                     # The return looks streamable, we are in the bundle2 case
  1029                     # and should return a stream.
  1029                     # and should return a stream.
  1030                     return streamres_legacy(gen=r.getchunks())
  1030                     return streamres_legacy(gen=r.getchunks())
  1031                 return pushres(r, output.getvalue() if output else '')
  1031                 return pushres(r, output.getvalue() if output else '')