From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Mike Mattie <codermattie@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: vc-bzr sha1sum dependency patch #2
Date: Wed, 06 May 2009 23:20:01 -0400 [thread overview]
Message-ID: <jwvws8tioqt.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20090423193557.GA6117@reforged> (Mike Mattie's message of "Thu, 23 Apr 2009 12:36:00 -0700")
> 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."
next prev parent reply other threads:[~2009-05-07 3:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 19:36 vc-bzr sha1sum dependency patch #2 Mike Mattie
2009-04-23 21:15 ` Chong Yidong
2009-04-23 21:42 ` Stefan Monnier
2009-05-07 3:20 ` Stefan Monnier [this message]
2009-05-14 5:25 ` Mike Mattie
2009-05-17 3:39 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvws8tioqt.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=codermattie@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.