From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Mattie Newsgroups: gmane.emacs.devel Subject: vc-bzr sha1sum dependency Date: Tue, 21 Apr 2009 10:26:04 -0700 Message-ID: <20090421172603.GB6265@reforged> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2B/JsCI69OhZNC5r" X-Trace: ger.gmane.org 1240334789 15427 80.91.229.12 (21 Apr 2009 17:26:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Apr 2009 17:26:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 21 19:27:49 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LwJl6-000560-9c for ged-emacs-devel@m.gmane.org; Tue, 21 Apr 2009 19:27:48 +0200 Original-Received: from localhost ([127.0.0.1]:43681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwJjh-0006ix-66 for ged-emacs-devel@m.gmane.org; Tue, 21 Apr 2009 13:26:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwJjc-0006iW-I9 for emacs-devel@gnu.org; Tue, 21 Apr 2009 13:26:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwJjY-0006ha-3n for emacs-devel@gnu.org; Tue, 21 Apr 2009 13:26:16 -0400 Original-Received: from [199.232.76.173] (port=53715 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwJjX-0006hX-TP for emacs-devel@gnu.org; Tue, 21 Apr 2009 13:26:11 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:30148) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LwJjX-0000s6-Cv for emacs-devel@gnu.org; Tue, 21 Apr 2009 13:26:11 -0400 Original-Received: from rv-out-0708.google.com ([209.85.198.243]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LwJjV-00006E-OY for emacs-devel@gnu.org; Tue, 21 Apr 2009 13:26:09 -0400 Original-Received: by rv-out-0708.google.com with SMTP id f25so2886922rvb.6 for ; Tue, 21 Apr 2009 10:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=bzheJ2yvo1sWg65dbOYzsiFH+eF6aq+qEMRusvbJbF8=; b=GndEH6a46B5QltS/QrYD8xOPEJvU0fiO58sC80l2++pWXwuTQH6D84e3UdJ7Hl42MS zG6cNCXg1r2cHlBVRh7xvKabU+fJAF9szCzQuxiYtbIB8QBv3ak0QV2vJXrrw5nfRF1D ZDuIOGkDQLUO1rd7Zm7uLUbqB2/yPpZ43KlkA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=HSBi3/A5fGUCn3CuZ/G9RFpioNJ+mAY3EJW6B6NZM2pwzE4+2GEZCA+OQV8Fpl/988 oecZPv6MP9eSrr+kD961W/nHAZ2yEvvRwvedwIcbhbqLwpuCVzBRG+qjOP/QvaGr4dag fzvYH58wZa0/lH9K71ep0PiRXsXd6OPXLA3o0= Original-Received: by 10.114.195.19 with SMTP id s19mr4073861waf.123.1240334768002; Tue, 21 Apr 2009 10:26:08 -0700 (PDT) Original-Received: from @ (c66-235-1-45.sea2.cablespeed.com [66.235.1.45]) by mx.google.com with ESMTPS id d20sm9494101waa.10.2009.04.21.10.26.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 21 Apr 2009 10:26:07 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) X-detected-kernel: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110395 Archived-At: --2B/JsCI69OhZNC5r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I was recently bit by the fact that vc-bzr uses sha1sum, and external progr= am to compute the state of a file in vc-bzr-state-heuristic. This depedency is suprising and buried rather deep. I looked at the code in= question and discovered that vc-bzr is picking apart an internal bzr file to find th= e state of a file, bypassing the now expensive call to bzr status. When the sha1sum program is not found a signal is thrown in a vc find-file = hook. This interruption produces a error message, but also causes the buffer to n= ot appear. The buffer has been created actually, but the switch to the buffer is not r= eached due to the signal. Even worse if you do find the buffer then the vc mode line u= pdates produce regular errors, and even saving a file was difficult. On digging a bit further I also realized that the [backend]-state-heuristic= is a part of the vc API, and it looks to me like it is scoped to implement work-aroun= ds for "stay local" like functionality for revision control systems that do not su= pport offline as well. I wrote a quick fix for vc-bzr, and I have included that patch. It is however a band-aid solution. It creates a new vc-bzr-state-heuristic functi= on that switches between the "fast"/heuristic and "slow"/status paths. After some more thought this sort of a fix might belong in the middle layer: vc-hooks. If the error trap and code path switch is implemented there the backend heuristic functions would have a real error path, which is needed assuming that they are assumed brittle by their design role. Another and possibly parallel solution is to merge a C implementation of sh= a1 into Emacs itself, which is probably a good idea as well. Your thoughts are appreciated, and I am willing to reform the patch as nece= ssary, inclusive of the feedback from the list. --=20 GnuPG Key: B9012279 is available from HKP server pgp.mit.edu --2B/JsCI69OhZNC5r Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAknuAasACgkQdfRchrkBInm4BwCeMpppFKfK35pqc99QmvxsOZ2C sVwAn2xb1l1yHoRH+COwr91mU/3/EenB =eocu -----END PGP SIGNATURE----- --2B/JsCI69OhZNC5r--