bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#68174: 30.0.50; Project and VC disagree about what repository we're


From: Sean Whitton
Subject: bug#68174: 30.0.50; Project and VC disagree about what repository we're in
Date: Tue, 02 Jan 2024 08:55:42 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

Hello,

On Tue 02 Jan 2024 at 05:31am +02, Dmitry Gutov wrote:

> I general, the problem looks unsolvable (or at least hard) because various
> VC-related buffers look back on the fileset that spawned them through the
> variable vc-parent-buffer. And that one is often just set to the buffer that
> was previous before the current one was created (in vc-setup-buffer).

Hmm.  This would be unfortunate.

> This particular case though seems fixed with this patch, please test:
>
> diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
> index 3cd835a9d6b..82051740b8f 100644
> --- a/lisp/vc/vc.el
> +++ b/lisp/vc/vc.el
> @@ -1074,6 +1074,7 @@ vc-expand-dirs
>
>  (defvar vc-dir-backend)
>  (defvar log-view-vc-backend)
> +(defvar log-view-vc-fileset)
>  (defvar log-edit-vc-backend)
>  (defvar diff-vc-backend)
>  (defvar diff-vc-revisions)
> @@ -1155,6 +1156,8 @@ vc-deduce-fileset
>             (vc-state buffer-file-name)
>             (vc-checkout-model backend buffer-file-name))
>       (list backend (list buffer-file-name))))
> +     ((derived-mode-p 'log-view-mode)
> +      (list log-view-vc-backend log-view-vc-fileset))
>       ((and (buffer-live-p vc-parent-buffer)
>             ;; FIXME: Why this test?  --Stef
>             (or (buffer-file-name vc-parent-buffer)

Yup, that works, thanks!

-- 
Sean Whitton





reply via email to

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