[PATCH 4 of 5] bundle2: also capture reply capability on failure
Augie Fackler
raf at durin42.com
Tue Jun 9 10:11:15 CDT 2015
On Mon, Jun 08, 2015 at 10:29:18AM -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1433577027 25200
> # Sat Jun 06 00:50:27 2015 -0700
> # Node ID 66fcbd3d716ab3e992b3ef2e6797390c75512ab1
> # Parent 5be1b649c5236da4d040f4482dabeaf8c263d690
> bundle2: also capture reply capability on failure
>
> When unbundling over the wire is aborted during, we have a mechanism to convey
there should be a word after "during" but I can't guess what it should be :(
> the error inside a bundle part. As we add support for more error, we need to
> know if the client will support them. For this purpose, we duck punch the reply
> capabilities of the client on the raised extensions.
>
> This is similar to what is done to salvage the server output on error.
>
> diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
> --- a/mercurial/bundle2.py
> +++ b/mercurial/bundle2.py
> @@ -345,12 +345,15 @@ def processbundle(repo, unbundler, trans
> # needed to handle different return codes to unbundle according to the
> # type of bundle. We should probably clean up or drop this return code
> # craziness in a future version.
> exc.duringunbundle2 = True
> salvaged = []
> + replycaps = None
> if op.reply is not None:
> salvaged = op.reply.salvageoutput()
> + replycaps = op.reply.capabilities
> + exc._replycaps = replycaps
> exc._bundle2salvagedoutput = salvaged
> raise
> finally:
> repo.ui.debug('bundle2-input-bundle: %i parts total\n' % nbpart)
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list