all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mike Mattie <codermattie@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: vc-bzr sha1sum dependency patch #2
Date: Wed, 13 May 2009 22:25:41 -0700	[thread overview]
Message-ID: <20090514052539.GA6203@reforged.homenet> (raw)
In-Reply-To: <jwvws8tioqt.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2068 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-05-14  5:25 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
2009-05-14  5:25   ` Mike Mattie [this message]
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=20090514052539.GA6203@reforged.homenet \
    --to=codermattie@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.