[PATCH 1 of 6] rust-chg: suppress panic while writing chg error to stderr
Gregory Szorc
gregory.szorc at gmail.com
Sun Oct 14 11:47:01 UTC 2018
On Sun, Oct 14, 2018 at 10:24 AM Yuya Nishihara <yuya at tcha.org> wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1538913351 -32400
> # Sun Oct 07 20:55:51 2018 +0900
> # Node ID 4a4f95df41de64fb472cb131d5ff4eeb8e846870
> # Parent 3b275f5497771d8a71336273a77575dbf4882798
> rust-chg: suppress panic while writing chg error to stderr
>
Queued parts 1-4. Didn't review parts 5 and 6 because I want to pay
attention to something IRL.
>
> Otherwise "chg >/dev/full 2>&1" would exit with 101. Spotted by
> test-basic.t.
>
> diff --git a/rust/chg/src/main.rs b/rust/chg/src/main.rs
> --- a/rust/chg/src/main.rs
> +++ b/rust/chg/src/main.rs
> @@ -20,7 +20,7 @@ use tokio_hglib::UnixClient;
>
> fn main() {
> let code = run().unwrap_or_else(|err| {
> - eprintln!("chg: abort: {}", err);
> + writeln!(io::stderr(), "chg: abort: {}", err).unwrap_or(());
> 255
> });
> process::exit(code);
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20181014/2c3c077b/attachment-0002.html>
More information about the Mercurial-devel
mailing list