[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn config file and mime types

From: Bill Hoffman <bill.hoffman_at_kitware.com>
Date: Sat, 25 Oct 2008 23:55:29 -0400

David Weintraub wrote:
> On Sat, Oct 25, 2008 at 10:34 AM, Bill Hoffman <bill.hoffman_at_kitware.com> wrote:

> Server side configuration files is not an easy addition into
> Subversion. Maybe the trick is to allow a configuration directory in
> the root of a project, and if that exists, have Subversion use that
> instead of the one in the user's $HOME directory. This could be a
> .subversion/config just like under the user's $HOME directory.
> Of course, Subversion has no way of knowing what is the root of the
> project, or what would happen if someone checks out a directory that
> is not in the root of a project. For example, I have a file
> svn://localhost/myproj/trunk/.subversion/config. That way, anyone who
> checks out this project, will get the config file under the
> .subversion directory. But, if this is a Maven project, there will be
> a src/main/java/com/company/myproj directory. If I am in this
> directory, the Subversion client would have to know that the config
> file is located at ../../../../../.subversion/config. Also, it is
> possible that someone decides to only checkout the
> svn://localhost/myproj/src/main/java/com/company/myproj directory
> since they only have to make minor changes in the Java code. No need
> to checkout the entire project tree! Now, the Subversion client would
> have no way of knowing that there is a special .subversion/config file
> for this project since the developer didn't even bother to checkout
> the directory that contains the project's config file.
> Which really just shows how hard it actually is to get a project
> configuration file in Subversion to work. Remember that Subversion is
> designed to work without a constant server connection. One of the
> biggest complaints about Perforce and ClearCase is that they prefer to
> be connected to the server in order to work. One of Subversion's
> advantages is its ability to work in a disconnected fashion.

That is not really what I had in mind. I was thinking that each project
could have a config file. Maybe it is a property set on the project.
If you could set a property for that project in svn that marked a file
in the tree as the config file. Then svn would look at that file for
config information. It would always be a file that is on the client.
So, the svn command would not have to talk to the server.

So, something like this:

svn propset config src src/config

That would set the config property on the directory src. It would say
that in the src tree there is a file located at src/config. When the
svn command did an add for a directory src or below, in addition to
adding the .subversion/config file, it would also read src/config as a
config file. That way a project could store the config file in itself.
svn would still not have to talk to the server before adding a file.

Now this does fail if you do not check out the whole project. The only
way around that would be to duplicate the config file in each directory
that is checked out from the server. The duplication would be on the
client side. I guess a copy could just be stored in each .svn
directory. You would set the property on the root of the project tree,
and then when you did the checkout of any file or directory it would be
put into each .svn directory that is created.

Although I bet a lot of folks would be happy if it worked with the whole
project being checked out.


To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-26 04:55:55 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.