From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r116999: Provide function for asking vc about project root Date: Mon, 21 Apr 2014 14:55:32 -0700 Message-ID: <535593D4.2000107@dancol.org> References: <535554D4.40606@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PvsRD9hpaJGD2KjM1mJskWQTx4fTvDGs2" X-Trace: ger.gmane.org 1398117359 4584 80.91.229.3 (21 Apr 2014 21:55:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2014 21:55:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 21 23:55:54 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WcMBq-00062h-HG for ged-emacs-devel@m.gmane.org; Mon, 21 Apr 2014 23:55:50 +0200 Original-Received: from localhost ([::1]:51722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcMBq-0002y2-9K for ged-emacs-devel@m.gmane.org; Mon, 21 Apr 2014 17:55:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcMBm-0002xc-1y for emacs-devel@gnu.org; Mon, 21 Apr 2014 17:55:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcMBf-0007Wj-Ti for emacs-devel@gnu.org; Mon, 21 Apr 2014 17:55:45 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:40980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcMBf-0007We-HL for emacs-devel@gnu.org; Mon, 21 Apr 2014 17:55:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=HEOA5RCYtnqxAVv53wf9N17mh/evXtS7pul4EJx+rNk=; b=EojkLNErxxsv/mz+TOVbjyIDjBLP1UGGvGI9KGf3YRW37P6ZlpRU/A6DFlB3xjiev4e2vyeZgVH4d6s9l38CppfH8Oade+rlFiM4lAh+m6tXhBb4iKPSctNQKMR02ZWZLzg1rhj2Bq+Kxa5ZQccY95CjB+baXaOvsbd0UvAQRyO8/1WTcc4V420ZPu0BiKArWTPhhMkiH4cvymXjnudGpe09tgA+PPVdh7EdiVdiZ9wrFVzjLVkkJEBPpfsCeTz/0Arvp3XPWXvGw9IkGYhgNXWQmyTwRYmmNhR2m0g1wyPBnzvBQlUA32+8Up12k55a3lp4zSfB7dLj+Oe8U+Tq6A==; Original-Received: from [2620:10d:c083:1003:863a:4bff:fec8:e538] by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1WcMBe-0004B1-Lm; Mon, 21 Apr 2014 14:55:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: X-Enigmail-Version: 1.6 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171548 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PvsRD9hpaJGD2KjM1mJskWQTx4fTvDGs2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 04/21/2014 02:51 PM, Stefan Monnier wrote: >>>> + (condition-case err >>>> + (vc-call-backend backend 'root default-directory) >>>> + (vc-not-supported >>>> + (unless (eq (cadr err) 'root) >>>> + (signal (car err) (cdr err))) >>>> + nil))))) >>> Why do we need this gymnastics? >> So that we don't accidentally suppress errors we *don't* expect to get= =2E >=20 > No: I see the hypothetical reason, but I was wondering about > a practical reason. IOW, I think this is overkill. Note that the cost= > is not only in code complexity but catching&re-raising signals also > defeats the backtraces in debug-on-error, which can be a pain. We're not catching all errors --- just vc-not-supported --- and it amounts to an assertion that nothing else went horribly wrong, because we re-raise only in cases where we'd otherwise swallow the error, and an error with a truncated stack is at least better than nothing at all. > I even wonder if we should allow `root' to fail. E.g. RCS/CVS could > just walk up the directories until there's no RCS/CVS subdir. Works for me. Backends could also just have their root functions explicitly return nil if they can't figure it out. --PvsRD9hpaJGD2KjM1mJskWQTx4fTvDGs2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTVZPUAAoJEMAaIROpHW7ICzwP/A244YCxxiNhAEfvQ1ZGgg/s O8D6XfKrmH7h2+vlJwqqu5xY51iWf53or7JqLs+qMtbyItEQpvIqFd6ACfBV9yaT t3Dk3F85mS4Orkc0fNhVLpOyrEqcwxTuV9oK/moei9MK+sOZuL7sfUTqyKJqCKsm urbhv2Ap6baXzScKVhG+y7sHw1uhg54PeM+/QqK/S6Ds9BORWzSj7/u7LaOhJ584 IQLiKwI3gVQb0Eb8HqnqXZ6qJMJv0lX34RmyhFFqbtEwfV4hnwrhsVmjV6sIV4AC XFqXLw8+wjtsMFL3ZiKqwGw3TQ6ReBP59Zgsst/3bJp6AXQ/Xv9JAhJAh5uYevQe 7FRw8O8r/24n/TVtEzsOenFok+WDRdP2SiIdLzLPEx7iVoEF/JngKCVIiJe+SVKL dx4qEjRflD+F8SQdzvft3CyvDoaMPePv5Knv+RqzqRYx06G++1rgU6vVAkdLPEou 8Q/JueepuG+BClpN2EYNdUuVXbtI+oYqV9bs42AtMKaFoiYRKlBQjG8m4HIhr/wr ibKZpYy4CwK+cGIDhoF1aLRJaTR7ABGjtcha/er136wo+OGhw1ZLX/sLJySF0msw JFO+sX+CWWnwdeR8YnvAGbO8pfflnE8q1QPaLfDZnqeXgOI/O7qK3zs4FbBn4Ivm KNpKOruYSkpDVZVbkQpi =FDmr -----END PGP SIGNATURE----- --PvsRD9hpaJGD2KjM1mJskWQTx4fTvDGs2--