[Top][All Lists]

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

bug#2157: 23.0.90; bzr support: vc-diff doesn't work with prefix argumen

From: Torsten Bronger
Subject: bug#2157: 23.0.90; bzr support: vc-diff doesn't work with prefix argument on unchanged files
Date: Wed, 04 Feb 2009 18:09:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux)


Dan Nicolaescu writes:

> [...]
> It looks like the lightweight checkout contains a
> .bzr/branch/location file that is not present in a normal one.  So
> that could be used to differentiate between the two, like here:
> --- vc-bzr.el.~1.74.~ Wed Feb  4 05:54:29 2009
> +++ vc-bzr.el         Wed Feb  4 07:43:07 2009
> @@ -327,7 +327,12 @@
>         (lastrev-file (expand-file-name vc-bzr-admin-lastrev rootdir)))
>      ;; This looks at internal files to avoid forking a bzr process.
>      ;; May break if they change their format.
> -    (if (file-exists-p branch-format-file)
> +    (if (and 
> +     (file-exists-p branch-format-file)
> +      (not (file-exists-p 
> +             (expand-file-name
> +               (concat vc-bzr-admin-dirname
> +                               "/branch/location") rootdir))))
>          (with-temp-buffer
>            (insert-file-contents branch-format-file)
>            (goto-char (point-min))

This probably works, however, even better is to check whether the
"location" starts with "file://" and then look there.  Maybe one can
just call the function recursively just with another "file"
parameter (must "file" exist actually?).  If "location" doesn't
start with "file://", do the fallback.

The Bazaar documentation explicitly says that lightweight checkouts
should be done only locally.  For example, you can use them to
switch efficiently between locally stored branches.  Therefore, one
can expect "file://" in most cases indeed.

I use to have many files open (40+), and when I start Emacs, I can
see a significant CPU usage of bzr processes now, thus my concern.


Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: address@hidden

reply via email to

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