[PATCH] phabricator: better error message when phabread fails to get a differential

Yuya Nishihara yuya at tcha.org
Mon Mar 25 18:12:22 EDT 2019


On Sun, 24 Mar 2019 19:24:12 -0400, Jordi GutiƩrrez Hermoso wrote:
> # HG changeset patch
> # User Laurent Peuch <cortex at worlddomination.be>
> # Date 1553469818 14400
> #      Sun Mar 24 19:23:38 2019 -0400
> # Node ID a39d18493bf66aa29f7d0dc1c5a4164b84507e1b
> # Parent  ba064f95175e6cb1467401a3a536d8c32229d4b1
> phabricator: better error message when phabread fails to get a differential
> 
> diff --git a/hgext/phabricator.py b/hgext/phabricator.py
> --- a/hgext/phabricator.py
> +++ b/hgext/phabricator.py
> @@ -783,8 +783,9 @@ def querydrev(repo, spec):
>              prefetched[drev[b'phid']] = drev
>              prefetched[int(drev[b'id'])] = drev
>          if key not in prefetched:
> -            raise error.Abort(_(b'cannot get Differential Revision %r')
> -                              % params)
> +            raise error.Abort(_(b'cannot get Differential Revision %s using the params %r.'
> +                              % (key, params)),

stringutil.pprint()? Otherwise, py3 would print b''.

> +                              hint=_("check that the Differential Revision exists and that you have access to it"))

test-check-code.t would say hi.


More information about the Mercurial-devel mailing list