Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7BACC200D5F for ; Mon, 18 Dec 2017 19:14:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7A1FF160C05; Mon, 18 Dec 2017 18:14:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C0C10160BFB for ; Mon, 18 Dec 2017 19:14:50 +0100 (CET) Received: (qmail 21151 invoked by uid 500); 18 Dec 2017 18:14:49 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 21140 invoked by uid 99); 18 Dec 2017 18:14:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2017 18:14:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3DA35C1B82 for ; Mon, 18 Dec 2017 18:14:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id m80S09Ab3-63 for ; Mon, 18 Dec 2017 18:14:47 +0000 (UTC) Received: from einhorn-mail.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1AFA05F39E for ; Mon, 18 Dec 2017 18:14:46 +0000 (UTC) X-Envelope-From: stsp@elego.de Received: from ted.stsp.name (ted.stsp.name [217.197.84.34]) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id vBIIEaxm003968 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Dec 2017 19:14:36 +0100 Received: from localhost (ted.stsp.name [local]) by ted.stsp.name (OpenSMTPD) with ESMTPA id 3b6b4cfe; Mon, 18 Dec 2017 19:14:36 +0100 (CET) Date: Mon, 18 Dec 2017 19:14:36 +0100 From: Stefan Sperling To: Daniel Shahaf Cc: dev@subversion.apache.org Subject: Re: list --search matching and Windows *-expansion Message-ID: <20171218181436.GC97781@ted.stsp.name> Mail-Followup-To: Daniel Shahaf , dev@subversion.apache.org References: <627ab8f1-235f-b4b9-6ae6-44d89212e77a@apache.org> <2d0ef1e5-b57f-3750-e465-f7fff1fc034c@apache.org> <1513620112.213942.1209016936.21B9885B@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1513620112.213942.1209016936.21B9885B@webmail.messagingengine.com> User-Agent: Mutt/1.9.1 (2017-09-22) archived-at: Mon, 18 Dec 2017 18:14:51 -0000 On Mon, Dec 18, 2017 at 06:01:52PM +0000, Daniel Shahaf wrote: > Branko Čibej wrote on Mon, 18 Dec 2017 16:24 +0100: > > Or use a different set of match chars on Windows instead of * and ?, as > > a hacky but usable workaround. That would mean that, only on windows, > > and in the argument of --search, we would replace, say, % and # with * > > and ? or some such. I'd even go as far as to add a warning that this > > substitution will be removed once (if?) we get rid of setargv.obj. > > I'm concerned about API divergence between Windows and Unix. Could we > try to minimise the possibilities for Windows admins to write code (say, > Python code using subprocess.check_call()) that won't work on Unix, and > vice-versa? > > For example, how about if we only perform the substitution you describe > if the pattern had a magic prefix, so «--search "nostar:foo#bar%"» would > pass "foo*bar?" to the API's on *all* platforms? This way, Windows code > would work on Unix, and Unix code that actually searches for percent signs > would work on Windows. How about we use Brane's idea, but with a twist: Essentially, we'd define some mapping between our fnmatch special chars and another set of chars that won't cause problems on a windows command line, chosen as needed to work around this windows-specific issue in our command line client. Then we could keep supporting these aliases on all platforms and it wouldn't matter which set of chars people use. Windows users would of course be advised to use the set of chars which works for them.