[Changed Subscribers] D10838: rhg: add exit code to HgError::Abort()

SimonSapin phabricator at mercurial-scm.org
Mon Jun 7 15:00:20 UTC 2021


SimonSapin added inline comments.

INLINE COMMENTS

> layer.rs:82
> +                    ),
> +                    10,
> +                ))?

Let’s define some named `const` items instead of using integer literals in this and other calls to `HgError::abort`. Maybe in `errors.rs`?

> errors.rs:32
>      /// machine-readable.
> -    Abort(String),
> +    Abort(String, i32),
>  

Please change this variant to use named fields, in order to say what this integer represents:

  Abort { message: String, detailed_exit_code: i32 }

… and change "The given string" in the doc-comment to "`message`"

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10838/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10838

To: pulkit, #hg-reviewers
Cc: SimonSapin, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210607/c4fe3942/attachment-0002.html>


More information about the Mercurial-patches mailing list