comparison mercurial/exchange.py @ 24849:aff2aca3420e stable

bundle2: also capture hook output during processing External hook used to directly write on stdout and stderr. As a result their output was not captured by the bundle2 processing. This resulted in confusing out of order output on the client side. We are now capturing hooks output in this context.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 23 Apr 2015 17:03:58 +0100
parents b705e5ab3b07
children 6b81309d15a7
comparison
equal deleted inserted replaced
24848:2f88821856eb 24849:aff2aca3420e
1301 tr.close() 1301 tr.close()
1302 except Exception, exc: 1302 except Exception, exc:
1303 exc.duringunbundle2 = True 1303 exc.duringunbundle2 = True
1304 if r is not None: 1304 if r is not None:
1305 parts = exc._bundle2salvagedoutput = r.salvageoutput() 1305 parts = exc._bundle2salvagedoutput = r.salvageoutput()
1306 repo.ui.pushbuffer(error=True) 1306 repo.ui.pushbuffer(error=True, subproc=True)
1307 def recordout(output): 1307 def recordout(output):
1308 part = bundle2.bundlepart('output', data=output, 1308 part = bundle2.bundlepart('output', data=output,
1309 mandatory=False) 1309 mandatory=False)
1310 parts.append(part) 1310 parts.append(part)
1311 raise 1311 raise