From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 19EF5431FC9 for ; Tue, 15 Jul 2014 17:17:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nSdiMf0oJXFR for ; Tue, 15 Jul 2014 17:17:33 -0700 (PDT) Received: from qmta07.emeryville.ca.mail.comcast.net (qmta07.emeryville.ca.mail.comcast.net [76.96.30.64]) by olra.theworths.org (Postfix) with ESMTP id DA279431FC0 for ; Tue, 15 Jul 2014 17:17:32 -0700 (PDT) Received: from omta22.emeryville.ca.mail.comcast.net ([76.96.30.89]) by qmta07.emeryville.ca.mail.comcast.net with comcast id SnsH1o0021vN32cA7oHYSx; Wed, 16 Jul 2014 00:17:32 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta22.emeryville.ca.mail.comcast.net with comcast id SoHX1o001152l3L8ioHXkE; Wed, 16 Jul 2014 00:17:32 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id D24C11295243; Tue, 15 Jul 2014 17:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1405469850; bh=dEK9AnJRrSA6unU41YugsVc9igTOJdQiatj3UhbglJ8=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=hv3MCmHtrEVbkhoS86eQyCWWwyNNBhnrXuoZkdECe8wYJWPunjUP2dLRbPJsoybF0 KJmS6MarfAIypoWIEpwd957SlVz7fmbuFhshdtnV34OlDW5XZIlLfl9iutzbRh2/aH fIMov6cnMkDxiH6yKDMHK71e1OmLIloRswEtAiIU= Date: Tue, 15 Jul 2014 17:17:30 -0700 From: "W. Trevor King" To: David Bremner Subject: Re: [PATCH 3/4] nmbug: Catch stderr in is_unmerged Message-ID: <20140716001730.GI30232@odin> References: <871ttm89nd.fsf@maritornes.cs.unb.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TA4f0niHM6tHt3xR" Content-Disposition: inline In-Reply-To: <871ttm89nd.fsf@maritornes.cs.unb.ca> OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8; url=http://tremily.us/pubkey.txt User-Agent: Mutt/1.5.23 (2014-03-12) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1405469852; bh=t7X1pZHdbWsxsdDpqp3PlQ9n+OuBTbTiYdwalQpjjBw=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=C3FYyqdNup4BIYhezqorK4HpMJttH0nzOX2rLp36e87hYSj53rc/ldbl2HwzFDvNp bEoD4+XUAvcyEv6Km1mWRb8vD+nEG3s0LZZXH8wE+eQBPqEow3CNlYfzPopTSsKVZ1 xb9FecTsKWTFM1+t4RYN/u3u2PczFyaFA3Xh7M9XaoeBA6skKODl3tYJJg8a8jYy6D 0PrElh6Upqc/Zu8NoYc/2cb9xtTpmS9eO1NSqJCuY0NJPlOWb7+PoEIGzyI6vNAquJ 1SWfOobFFEyEpnr6nmCta4mh78GmjFUCjJdGmYikNW+yNpdmWaiV2tRzOkrf3IHZjN LRfydYhzgKj/w== Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 00:17:37 -0000 --TA4f0niHM6tHt3xR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 15, 2014 at 08:49:58PM -0300, David Bremner wrote: > "W. Trevor King" writes: >=20 > > + if ($dir eq '-2|') { > > + $dir =3D '-|'; > > + } > > + >=20 > I think I'd prefer an extra flag, rather than making new syntax. > The existing syntax is not pretty, but it is standard perl There should be standard Perl syntax for capturing both streams ;). I can add a separate parameter instead, but Perl doesn't seem to have keyword-arguments. At least, nmbug relies on assumptions about argument values: sub git_pipe { my $envref =3D (ref $_[0] eq 'HASH') ? shift : {}; my $ioref =3D (ref $_[0] eq 'ARRAY') ? shift : undef; my $dir =3D ($_[0] eq '-|' or $_[0] eq '|-') ? shift : undef; =E2=80=A6 } to map positional arguments back into particular semantic meanings. That seemed ugly enough (can we only have a single boolean argument with this pattern?) that I'd prefer piggy-backing on Perl's stream-direction syntax. But let me know what you like best, and I'll go that way with v2. I'd be happy to rewrite nmbug in Python too, which has (to my eyes) much saner kwargs and subprocess handling. Cheers, Trevor --=20 This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy --TA4f0niHM6tHt3xR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTxcSZAAoJEG8/JgBt8ol8FPIQANNwWT84kmfekKyaKep6v4Af r+kyvbzu+HmYmEO6dVcfraMOj1nM1gJrsKXR7OnlPeEetmbTeixfSkXG4M7VYIcr LuPNSwYm5e13ZGoYiWeZP4bdWtsvOuR9qn66T/GCdsuX99vTNZsXPiyfuyx+FzZS C+ADb4kCeI1zI3zyFu6FmNA/pxBhSalFNZ7cMk76yVcT9Slq/dL57G/c3GjFx9hR 0lQTILZ4tn5iHbFPxOVO/7grZTbDWox5qUaXiFtx5DHREfxF5TfCRJnPCzHvcIV3 lle3WZiPMr0o3dc2PUmn2j7A49sM206lK//Z4WTkdzxZW2tI+bu8YMn5yCkHa+Ck 3wJAO6HPJZ9ylGCyqLqSZ9WMILABwN3LaNlIMio/0llFRWzK0tZpzpUv76WO2cTo GGFFTEvWs4MqkPQEGU8iBLqv0+7T8c6m635vMIla9gn+u9C+2+74BV6/sUOhSRu1 /BhoRVB2znRRnbVcpn/tTFJh4+PVmm+CmzfO99ugEqu69fRM5Qd+/zpRXYYopWpO kFQvyGfrLDHFXVIX48pMO8MsJ8fuTAHy9/QvFBro/Xr77iJ8Li8adCi7VXCDvVsK 9CYq9NoZAjvM4KWKKzWd3DRt118dChOHGy3RPXFnzlCFyj+AjWVKVzMpD0GpgjUA t8HLgz8endMzhoi5tGLq =MGv8 -----END PGP SIGNATURE----- --TA4f0niHM6tHt3xR--