From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: vc-directory breakage Date: Tue, 06 May 2008 11:08:53 +0200 Message-ID: <86ej8fztne.fsf@lola.quinscape.zz> References: <20080505152149.E5BB99F054B@snark.thyrsus.com> <857ie8ahr3.fsf@lola.goethe.zz> <20080506000456.GA14206@thyrsus.com> <200805060036.m460aVto021222@sallyv1.ics.uci.edu> <20080506004849.GA14523@thyrsus.com> <20080506082112.GC23773@thyrsus.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210065725 32642 80.91.229.12 (6 May 2008 09:22:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 May 2008 09:22:05 +0000 (UTC) Cc: "Eric S. Raymond" , Dan Nicolaescu , Stefan Monnier , emacs-devel@gnu.org To: esr@thyrsus.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 06 11:22:39 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JtJNe-00008N-Gw for ged-emacs-devel@m.gmane.org; Tue, 06 May 2008 11:22:38 +0200 Original-Received: from localhost ([127.0.0.1]:55251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtJMw-0006nD-K3 for ged-emacs-devel@m.gmane.org; Tue, 06 May 2008 05:21:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JtJAV-0006wj-2h for emacs-devel@gnu.org; Tue, 06 May 2008 05:09:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JtJAP-0006qa-3h for emacs-devel@gnu.org; Tue, 06 May 2008 05:09:01 -0400 Original-Received: from [199.232.76.173] (port=47307 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtJAO-0006qJ-NA for emacs-devel@gnu.org; Tue, 06 May 2008 05:08:56 -0400 Original-Received: from mail.quinscape.de ([212.29.44.217]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JtJAN-0007ni-V1 for emacs-devel@gnu.org; Tue, 06 May 2008 05:08:56 -0400 Original-Received: (qmail-ldap/ctrl 3373 invoked from network); 6 May 2008 09:08:54 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by quinx.quinscape.de (qmail-ldap-1.03) with SMTP for ; 6 May 2008 09:08:53 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id D2BBEE1E57; Tue, 6 May 2008 11:08:53 +0200 (CEST) In-Reply-To: <20080506082112.GC23773@thyrsus.com> (Eric S. Raymond's message of "Tue, 6 May 2008 04:21:12 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-AntiVirus: checked by AntiVir MailGate (version: 2.1.3-2; AVE: 7.8.0.11; VDF: 7.0.4.2; host: quinx) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96576 Archived-At: "Eric S. Raymond" writes: > Stefan Monnier : >> 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