Patchwork dispatch: stop warning about EPIPE in --debug mode

login
register
mail settings
Submitter Daniel Colascione (SEATTLE)
Date Sept. 24, 2015, 7:24 a.m.
Message ID <5603A528.9050108@fb.com>
Download mbox | patch
Permalink /patch/10609/
State Accepted
Commit 9f2d4c137f6e10085ede5b2adb1748de8ab7cbac
Headers show

Comments

Daniel Colascione (SEATTLE) - Sept. 24, 2015, 7:24 a.m.
# HG changeset patch
# User Daniel Colascione <dancol@fb.com>
# Date 1443078937 -10800
#      Thu Sep 24 10:15:37 2015 +0300
# Node ID ef903d0c1928d9409640485e0908beb40414fe7a
# Parent  60558319ce724e8377c56591af3089380753f6de
dispatch: stop warning about EPIPE in --debug mode

It seems silly for "hg --debug manifest | less" to print a scary
message after the user hits "q" in less.  hg should just exit silently
instead, since EPIPE on stdout is a perfectly reasonable result.

inst.filename))
@@ -310,10 +309,7 @@
         try:
             ui.warn(_("interrupted!\n"))
         except IOError as inst:
-            if inst.errno == errno.EPIPE:
-                if ui.debugflag:
-                    ui.warn(_("\nbroken pipe\n"))
-            else:
+            if inst.errno != errno.EPIPE:
                 raise
     except MemoryError:
         ui.warn(_("abort: out of memory\n"))
Bryan O'Sullivan - Sept. 24, 2015, 11:16 p.m.
On Thu, Sep 24, 2015 at 12:24 AM, Daniel Colascione (SEATTLE) <dancol@fb.com
> wrote:

> dispatch: stop warning about EPIPE in --debug mode
>

I pushed this to the crew repo, but apparently that has changed in some
fairly drastic way. Eeek.
Matt Mackall - Sept. 25, 2015, 1:59 a.m.
On Thu, 2015-09-24 at 16:16 -0700, Bryan O'Sullivan wrote:
> On Thu, Sep 24, 2015 at 12:24 AM, Daniel Colascione (SEATTLE) <dancol@fb.com
> > wrote:
> 
> > dispatch: stop warning about EPIPE in --debug mode
> >
> 
> I pushed this to the crew repo, but apparently that has changed in some
> fairly drastic way. Eeek.

The crew repo is basically deprecated as it was down to one active user
who's mostly started pushing to clowncopter and none of the active
maintainers have admin access. That will shortly be replaced by a repo
on mercurial-scm.org once we get new SSL certs for it sorted.

There's apparently a mismatch between the hg and evolve versions
deployed on crew, which means your latest push has caused my 5-minute
cross-repo sync cronjob to start emailing me, which might be the final
death blow.

I'll take care of queueing Daniel's patch shortly.
Matt Mackall - Sept. 25, 2015, 5:42 p.m.
On Thu, 2015-09-24 at 10:24 +0300, Daniel Colascione (SEATTLE) wrote:
> # HG changeset patch
> # User Daniel Colascione <dancol@fb.com>
> # Date 1443078937 -10800
> #      Thu Sep 24 10:15:37 2015 +0300
> # Node ID ef903d0c1928d9409640485e0908beb40414fe7a
> # Parent  60558319ce724e8377c56591af3089380753f6de
> dispatch: stop warning about EPIPE in --debug mode
> 
> It seems silly for "hg --debug manifest | less" to print a scary
> message after the user hits "q" in less.  hg should just exit silently
> instead, since EPIPE on stdout is a perfectly reasonable result.

Queued for default, thanks. It is indeed pretty silly.

FYI, this patch came through with a bit of MIME QP damage, you might
want to try the pushgate next time:

https://mercurial.selenic.com/wiki/ContributingChanges#Experimental_submission_via_push_gate
Bryan O'Sullivan - Sept. 25, 2015, 6:33 p.m.
Oops, sorry for the inconvenience :-(

Where would one find the secret decoder ring for approving and upstreaming
the occasional low-risk patch in this modern era?

On Thu, Sep 24, 2015 at 6:59 PM, Matt Mackall <mpm@selenic.com> wrote:

> The crew repo is basically deprecated as it was down to one active user
> who's mostly started pushing to clowncopter and none of the active
> maintainers have admin access. That will shortly be replaced by a repo
> on mercurial-scm.org once we get new SSL certs for it sorted.
>
> There's apparently a mismatch between the hg and evolve versions
> deployed on crew, which means your latest push has caused my 5-minute
> cross-repo sync cronjob to start emailing me, which might be the final
> death blow.
>
> I'll take care of queueing Daniel's patch shortly.
>
Matt Mackall - Sept. 25, 2015, 7:43 p.m.
On Fri, 2015-09-25 at 11:33 -0700, Bryan O'Sullivan wrote:
> Oops, sorry for the inconvenience :-(
> 
> Where would one find the secret decoder ring for approving and upstreaming
> the occasional low-risk patch in this modern era?

Pierre-Yves is the chief clowncopter pilot.
Pierre-Yves David - Sept. 25, 2015, 8:16 p.m.
On 09/25/2015 12:43 PM, Matt Mackall wrote:
> On Fri, 2015-09-25 at 11:33 -0700, Bryan O'Sullivan wrote:
>> Oops, sorry for the inconvenience :-(
>>
>> Where would one find the secret decoder ring for approving and upstreaming
>> the occasional low-risk patch in this modern era?
>
> Pierre-Yves is the chief clowncopter pilot.

I should probably update my business card with that, but Goat Lenders is 
already taking some room there.

Patch

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -292,8 +292,7 @@ 
             ui.warn(_("abort: error: %s\n") % reason)
         elif (util.safehasattr(inst, "args")
               and inst.args and inst.args[0] == errno.EPIPE):
-            if ui.debugflag:
-                ui.warn(_("broken pipe\n"))
+            pass
         elif getattr(inst, "strerror", None):
             if getattr(inst, "filename", None):
                 ui.warn(_("abort: %s: %s\n") % (inst.strerror,