Mercurial > public > mercurial-scm > hg-stable
diff mercurial/exchange.py @ 30870:4c8dcb491974 stable
bundle2: keep hint close to the primary message when remote abort
The remote hint message was ignored when reporting the remote error and
passed to the local generic abort error. I think I might initially have
tried to avoid reimplementing logic controlling the hint display depending of
the verbosity level. However, first, there does not seems to have such verbosity
related logic and second the resulting was wrong as the primary error and the
hint were split apart. We now properly print the hint as remote output.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 10 Feb 2017 17:56:47 +0100 |
parents | 95325386cd1a |
children | d70971a3ae80 |
line wrap: on
line diff
--- a/mercurial/exchange.py Sun Feb 12 02:23:33 2017 +0900 +++ b/mercurial/exchange.py Fri Feb 10 17:56:47 2017 +0100 @@ -904,7 +904,9 @@ raise error.Abort(_('missing support for %s') % exc) except bundle2.AbortFromPart as exc: pushop.ui.status(_('remote: %s\n') % exc) - raise error.Abort(_('push failed on remote'), hint=exc.hint) + if exc.hint is not None: + pushop.ui.status(_('remote: %s\n') % ('(%s)' % exc.hint)) + raise error.Abort(_('push failed on remote')) except error.PushkeyFailed as exc: partid = int(exc.partid) if partid not in pushop.pkfailcb: