mercurial/exchange.py
branchstable
changeset 24850 6b81309d15a7
parent 24849 aff2aca3420e
child 24851 df0ce98c882f
equal deleted inserted replaced
24849:aff2aca3420e 24850:6b81309d15a7
  1296                 tr = repo.transaction(source)
  1296                 tr = repo.transaction(source)
  1297                 tr.hookargs['source'] = source
  1297                 tr.hookargs['source'] = source
  1298                 tr.hookargs['url'] = url
  1298                 tr.hookargs['url'] = url
  1299                 tr.hookargs['bundle2'] = '1'
  1299                 tr.hookargs['bundle2'] = '1'
  1300                 r = bundle2.processbundle(repo, cg, lambda: tr).reply
  1300                 r = bundle2.processbundle(repo, cg, lambda: tr).reply
       
  1301                 if r is not None:
       
  1302                     repo.ui.pushbuffer(error=True, subproc=True)
       
  1303                     def recordout(output):
       
  1304                         r.newpart('output', data=output, mandatory=False)
  1301                 tr.close()
  1305                 tr.close()
  1302             except Exception, exc:
  1306             except Exception, exc:
  1303                 exc.duringunbundle2 = True
  1307                 exc.duringunbundle2 = True
  1304                 if r is not None:
  1308                 if r is not None:
  1305                     parts = exc._bundle2salvagedoutput = r.salvageoutput()
  1309                     parts = exc._bundle2salvagedoutput = r.salvageoutput()
  1306                     repo.ui.pushbuffer(error=True, subproc=True)
       
  1307                     def recordout(output):
  1310                     def recordout(output):
  1308                         part = bundle2.bundlepart('output', data=output,
  1311                         part = bundle2.bundlepart('output', data=output,
  1309                                                   mandatory=False)
  1312                                                   mandatory=False)
  1310                         parts.append(part)
  1313                         parts.append(part)
  1311                 raise
  1314                 raise