Mercurial > public > mercurial-scm > hg
comparison mercurial/bundle2.py @ 24795:f9aa4cb8f2dd
bundle2: store the salvaged output on the exception object
The re-handling of output is happening in some 'unbundle' callers. We have to
transmit the output information to this place so we stick it on the exception.
This is the third step in our quest for preserving the server output on error
(issue4594). We want to be able to copy the output part from the aborted reply
into the exception bundle.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 16 Apr 2015 03:17:01 -0400 |
parents | 21f2e8f48ae1 |
children | e79dd1c9753e |
comparison
equal
deleted
inserted
replaced
24794:21f2e8f48ae1 | 24795:f9aa4cb8f2dd |
---|---|
316 # processing from processing the old format. This is mostly | 316 # processing from processing the old format. This is mostly |
317 # needed to handle different return codes to unbundle according to the | 317 # needed to handle different return codes to unbundle according to the |
318 # type of bundle. We should probably clean up or drop this return code | 318 # type of bundle. We should probably clean up or drop this return code |
319 # craziness in a future version. | 319 # craziness in a future version. |
320 exc.duringunbundle2 = True | 320 exc.duringunbundle2 = True |
321 salvaged = [] | |
322 if op.reply is not None: | |
323 salvaged = op.reply.salvageoutput() | |
324 exc._bundle2salvagedoutput = salvaged | |
321 raise | 325 raise |
322 return op | 326 return op |
323 | 327 |
324 def _processpart(op, part): | 328 def _processpart(op, part): |
325 """process a single part from a bundle | 329 """process a single part from a bundle |