emacs-devel
[Top][All Lists]
Advanced

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

Re: vc-directory breakage


From: David Kastrup
Subject: Re: vc-directory breakage
Date: Tue, 06 May 2008 11:08:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Eric S. Raymond" <address@hidden> writes:

> Stefan Monnier <address@hidden>:
>> I believe you have misunderstood the request, then: "support the multi-VCS
>> case" means exactly what Dan asks, which is "make sure only one backend
>> is used for a given command, even if the command includes files that are
>> under various backends".
>> 
>> I.e. the issue is not "several subdirs of *vc-dir* which each use
>> a different backend", but "all the files under *vc-dir* are under the
>> control of several backends at the same time".
>
> I understood the second part.  But your first paragraph leaves me
> more confused than I was before.
>
> It is already the case that "only one backend is used for a given
> command, even if the command includes files that are under various
> backends".  If a fileset is not all owned by the same backend, a
> consistency check in vc-deduce-fileset will fail.  And C-u C-x v v 
> allows us to change the preferred backend for a set of files.
>
> What I don't see is what any of this has to do with keeping a
> buffer-local backend variable per directory, which is what Dan is
> saying he wants.  By hypothesis, backend is a per-*file* property.

I don't think I agree.  I think that a single buffer should be
associated with a single version control system, period.  This also
holds for VC directories.  They have files which are under _their_
version control, and files that aren't.  No more distinctions than that.
When visiting a file buffer via that VC directory, its backend should be
changed to match the backend of the VC.  When visiting a VC directory
from a file buffer in a certain backend, either a separate buffer should
be created (possibly containing the VC name in its name), or the
existing buffer should be scrapped and reentered.  In order to not lose
any marks and stuff, it might be nicest if the version control system
was made part of the buffer name, and visiting the directory under
different VC systems managed different buffers.

> I don't see how trying to cache it per directory can be a good idea.

Not per directory.  Per buffer, and that includes VC directory buffers.
When using C-x v d, the current version control backend of the current
buffer should get used.  If there is none, it may get deduced
automatically in some manner.

-- 
David Kastrup




reply via email to

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