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: [patch] vc-find-root with invert Date: Tue, 22 Jul 2008 00:00:43 +0200 Message-ID: <85ej5maodw.fsf@lola.goethe.zz> References: <486E5CE0.5090004@justinbogner.com> <486E668E.2050600@justinbogner.com> <20080705072126.GA936@tomas> <4884B8FC.9040301@justinbogner.com> <488500C2.8060001@justinbogner.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1216677710 16613 80.91.229.12 (21 Jul 2008 22:01:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jul 2008 22:01:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Justin Bogner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 22 00:02: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 1KL3Sm-0006ak-SC for ged-emacs-devel@m.gmane.org; Tue, 22 Jul 2008 00:02:37 +0200 Original-Received: from localhost ([127.0.0.1]:49729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KL3Rt-0007NB-Iy for ged-emacs-devel@m.gmane.org; Mon, 21 Jul 2008 18:01:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KL3R1-000780-Nk for emacs-devel@gnu.org; Mon, 21 Jul 2008 18:00:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KL3R0-00077E-5D for emacs-devel@gnu.org; Mon, 21 Jul 2008 18:00:47 -0400 Original-Received: from [199.232.76.173] (port=50094 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KL3R0-000779-0W for emacs-devel@gnu.org; Mon, 21 Jul 2008 18:00:46 -0400 Original-Received: from mail-in-01.arcor-online.net ([151.189.21.41]:51385) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KL3Qz-0002SW-EG for emacs-devel@gnu.org; Mon, 21 Jul 2008 18:00:45 -0400 Original-Received: from mail-in-20-z2.arcor-online.net (mail-in-20-z2.arcor-online.net [151.189.8.85]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id E245C1056F6; Tue, 22 Jul 2008 00:00:43 +0200 (CEST) Original-Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mail-in-20-z2.arcor-online.net (Postfix) with ESMTP id D3EFB1078B7; Tue, 22 Jul 2008 00:00:43 +0200 (CEST) Original-Received: from lola.goethe.zz (dslb-084-061-050-208.pools.arcor-ip.net [84.61.50.208]) by mail-in-03.arcor-online.net (Postfix) with ESMTP id 8DA373425E1; Tue, 22 Jul 2008 00:00:43 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 2DD0D1C1346B; Tue, 22 Jul 2008 00:00:43 +0200 (CEST) In-Reply-To: <488500C2.8060001@justinbogner.com> (Justin Bogner's message of "Mon, 21 Jul 2008 15:33:54 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Virus-Scanned: ClamAV 0.93.3/7770/Mon Jul 21 21:30:47 2008 on mail-in-03.arcor-online.net X-Virus-Status: Clean X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:101134 Archived-At: Justin Bogner writes: > Stefan Monnier wrote: >>>> Reading the docstring, my guess would be: vc-find-root walks the dir >>>> tree up _until_ it finds WITNESS (as an evidence for the VC tree's root >>>> dir). Unless we have CVS or SVN or similar, where every subdir has >>>> WITNESS, so the root would be the last up-tree directory having WITNESS. >> >> That still doesn't tell me what it does. I mean I can read the code and >> understand what is the effect of calling the code like this, but I have >> no idea what effect it has for the user. AFAICT it's a misfeature. >> >>> This is exactly correct, though in the current trunk there is a bug >>> such that the function does not behave like this. The patch causes it >>> to work as documented. >> >> I think we should remove this misfeature rather than fix it. > > There are two types of version control directory, ones with a "root" > directory in each directory under version control, and on with a > "root" directory in the root of the version control. Since this > function's purpose is to find the actual root of the tree, the latter > case is simple, where it needs only find the "root" directory. > > However, for the other case, we need traverse upwards until we don't > find the directory, returning the last one that does. Why? CVS or SVN do not do this either. Subdirectories with .svn in them are self-contained work directories with associated repository location. > As far as getting rid of invert, we could do that, and the function > would then return something more reasonable than it does now, but it > wouldn't actually find the root unless you happened to try the root > first. There is no dedicated root in CVS or SVN. You never need to look at .. in order to do local operations. You can move your directory out to a different location under a different "root" and things will work just the same from there. Which is pretty much the principal reason for every directory having its own CVS or .svn subdirectories. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum