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

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

bug#43464: 28.0.50; vc: Error calling vc-revert for repo root


From: Andrii Kolomoiets
Subject: bug#43464: 28.0.50; vc: Error calling vc-revert for repo root
Date: Sun, 11 Oct 2020 23:28:08 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)

Dmitry Gutov <dgutov@yandex.ru> writes:

>> Can you please advice me what this change should look like?  Get rid
>> of calling 'vc-call'?
>
> Yes. How about the attached patch?

Small fix: THEN and ELSE blocks of the '(if dir...' should be swapped.

Does those kind of changes should be applied to any function that uses
'vc-call' and can be called on dirs?

Is there any reason to use 'vc-backend' at all?
'vc-responsible-backend' will call 'vc-backend' on a file that is not a
directory.

>> In this case the function 'vc-version-backup-file'
>> must be changed as well.
>
> Does it actually make sense to use it on a directory?

Looks like it make sense for CVS backend.  Take a look at
'vc-cvs-stay-local-p'.

> Something like that. Or 'git init' inside a subdirectory. Not a
> frequent occurrence, but if we start using directories and files
> interchangeably in more places, we are likely to start caching other
> properties on them, too. So it's better to use a different function to
> detect which backend a directory belongs to.

In this case `vc-call` must use that function, right?

> Also, your patch makes vc-registered work on directories.

How is that?  'vc-registered' is still returns nil for directories.  The
changes affects only the side effect of it.





reply via email to

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