[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] vc-find-root with invert
From: |
David Kastrup |
Subject: |
Re: [patch] vc-find-root with invert |
Date: |
Tue, 22 Jul 2008 00:00:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Justin Bogner <address@hidden> 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
- [patch] vc-find-root with invert, Justin Bogner, 2008/07/04
- Re: [patch] vc-find-root with invert, Stefan Monnier, 2008/07/04
- Re: [patch] vc-find-root with invert, Justin Bogner, 2008/07/04
- Re: [patch] vc-find-root with invert, Stefan Monnier, 2008/07/04
- Re: [patch] vc-find-root with invert, tomas, 2008/07/05
- Re: [patch] vc-find-root with invert, Justin Bogner, 2008/07/21
- Re: [patch] vc-find-root with invert, Stefan Monnier, 2008/07/21
- Re: [patch] vc-find-root with invert, Justin Bogner, 2008/07/21
- Re: [patch] vc-find-root with invert,
David Kastrup <=
- Re: [patch] vc-find-root with invert, Justin Bogner, 2008/07/21
- Re: [patch] vc-find-root with invert, David Kastrup, 2008/07/21
- Re: [patch] vc-find-root with invert, Justin Bogner, 2008/07/23
- Re: [patch] vc-find-root with invert, Stefan Monnier, 2008/07/23
- Re: [patch] vc-find-root with invert, Stefan Monnier, 2008/07/21