emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vc-bzr sha1sum dependency patch #2


From: Stefan Monnier
Subject: Re: vc-bzr sha1sum dependency patch #2
Date: Wed, 06 May 2009 23:20:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux)

> 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."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]