From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: vc-bzr sha1sum dependency patch #2 Date: Wed, 06 May 2009 23:20:01 -0400 Message-ID: References: <20090423193557.GA6117@reforged> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1241666424 8215 80.91.229.12 (7 May 2009 03:20:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2009 03:20:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Mike Mattie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 07 05:20:14 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 1M1u9d-0001ED-F1 for ged-emacs-devel@m.gmane.org; Thu, 07 May 2009 05:20:13 +0200 Original-Received: from localhost ([127.0.0.1]:44490 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1u9c-00085Y-Hg for ged-emacs-devel@m.gmane.org; Wed, 06 May 2009 23:20:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1u9X-00085J-UK for emacs-devel@gnu.org; Wed, 06 May 2009 23:20:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1u9U-00084p-1k for emacs-devel@gnu.org; Wed, 06 May 2009 23:20:07 -0400 Original-Received: from [199.232.76.173] (port=42966 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1u9T-00084f-LO for emacs-devel@gnu.org; Wed, 06 May 2009 23:20:03 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:18432 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M1u9T-0001W4-BD for emacs-devel@gnu.org; Wed, 06 May 2009 23:20:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4EAD/wAUrO+IYe/2dsb2JhbACBUM5NhAMFhVM X-IronPort-AV: E=Sophos;i="4.40,306,1238990400"; d="scan'208";a="38112845" Original-Received: from 206-248-134-30.dsl.teksavvy.com (HELO pastel.home) ([206.248.134.30]) by ironport2-out.teksavvy.com with ESMTP; 06 May 2009 23:20:01 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4068B7F75; Wed, 6 May 2009 23:20:01 -0400 (EDT) In-Reply-To: <20090423193557.GA6117@reforged> (Mike Mattie's message of "Thu, 23 Apr 2009 12:36:00 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) 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:110742 Archived-At: > Here is a corrected version of the patch I sent in the message vc-bzr sha1sum dependency Can you test the patch below instead? Stefan --- vc-bzr.el.~1.77.~ 2009-04-08 20:09:55.000000000 -0400 +++ vc-bzr.el 2009-05-06 23:19:06.000000000 -0400 @@ -143,7 +143,7 @@ (defun vc-bzr-state-heuristic (file) "Like `vc-bzr-state' but hopefully without running Bzr." - ;; `bzr status' is excrutiatingly slow with large histories and + ;; `bzr status' was excrutiatingly slow with large histories and ;; pending merges, so try to avoid using it until they fix their ;; performance problems. ;; This function tries first to parse Bzr internal file @@ -158,8 +158,7 @@ ;; This looks at internal files. May break if they change ;; their format. (lexical-let ((dirstate (expand-file-name vc-bzr-admin-dirstate root))) - (if (not (file-readable-p dirstate)) - (vc-bzr-state file) ; Expensive. + (condition-case nil (with-temp-buffer (insert-file-contents dirstate) (goto-char (point-min)) @@ -201,7 +200,13 @@ (vc-bzr-sha1 file))) 'up-to-date) (t 'edited)) - 'unregistered))))))))) + 'unregistered)))) + ;; Either the dirstate file can't be read, or the sha1 + ;; executable is missing, or ... + ;; In either case, recent versions of Bzr aren't that slow + ;; any more. + (error (vc-bzr-state file))))))) + (defun vc-bzr-registered (file) "Return non-nil if FILE is registered with bzr."