Subject: bug#70526: 29.2; package-vc-upgrade failed with error message "File is not under version control"

From: Philip Kaludercic <[email-masked]>
Date: Wed, 24 Apr 2024 07:51:54 +0000

"Yi Yue" <[email-masked]> writes:

>> >
>> > As you suggested earlier, maybe we need to modify vc.el, making the restriction looser?
>
>> If you can, try out the above patch and tell me if you end up having any
>> issues, otherwise I don't think we need to adjust vc.
>
> Yes, it works as expected, thanks. But now it will create an
> additional empty buffer named "{pkg}*", {pkg} is the name of pacakge.
> So I suggest the following code:
>
> ------------------------------------------------------------------
> (with-demoted-errors "Failed to fetch: %S"
>   (require 'vc-dir)
>   (let ((vcbuf (vc-dir-prepare-status-buffer
>                 (format " *vc-dir: %s*" pkg-dir)
>                 pkg-dir (vc-responsible-backend pkg-dir))))
>     (unwind-protect
> 	(with-current-buffer vcbuf
>           (vc-pull))
>       (kill-buffer vcbuf))))
> -------------------------------------------------------------------
>
> Anyway, I think this buffer doesn't matter. Both are OK.

As the buffer is hidden, I didn't see the need to clean it up.  It can
be re-used later on and might help with debugging.

> Regards
> Yi Yue

-- 
	Philip Kaludercic on peregrine