[PATCH] error: make it clear that ProgrammingError is for mercurial developers

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Dec 12 14:58:29 EST 2016



On 12/12/2016 09:03 AM, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1481529712 0
> #      Mon Dec 12 08:01:52 2016 +0000
> # Node ID 5efb46608ea75d45f1f4a73c33983c61177134b9
> # Parent  3cec78a0556e35becc138801917b1d11a612ce60
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r 5efb46608ea7
> error: make it clear that ProgrammingError is for mercurial developers
>
> The word "developer" could refer to users - people using hg are likely to be
> developers. Add adjectives to make it refer to mercurial developers only.

That one is pushed, thanks. There is probably a small cohort of 'assert' 
waiting to be converted into ProgrammingError.

> diff --git a/mercurial/error.py b/mercurial/error.py
> --- a/mercurial/error.py
> +++ b/mercurial/error.py
> @@ -170,5 +170,5 @@ class PushRaced(RuntimeError):
>
>  class ProgrammingError(RuntimeError):
> -    """Raised if a developer has made some mistake"""
> +    """Raised if a mercurial (core or extension) developer made a mistake"""
>
>  # bundle2 related errors

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list