[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vc-bzr sha1sum dependency patch #2
From: |
Mike Mattie |
Subject: |
Re: vc-bzr sha1sum dependency patch #2 |
Date: |
Wed, 13 May 2009 22:25:41 -0700 |
User-agent: |
Mutt/1.5.16 (2007-06-09) |
I tested your patch and it worked fine. Your patch is a far better solution
than mine in all respects. My thumb's up for applying it.
On Wed, May 06, 2009 at 11:20:01PM -0400, Stefan Monnier wrote:
> > 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."
--
GnuPG Key: B9012279 is available from HKP server pgp.mit.edu
pgpwZrYeEJd1w.pgp
Description: PGP signature