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

Re: %HOME% on Win32 (Re: ra_dav compression question)

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-06-23 16:12:06 CEST

Chris Hecker wrote:

> You can already change your %APPDATA% setting to, say, a subdirectory of
>
>> your %HOME%. So you can get almost exactly what you want without
>> changing a single line of SVN code.
>
>
> This will destroy the universe, I'm fairly sure. Windows is really
> bad about that kind of thing. I've never tried it, however. Have you?

Yes, I have. It works. And these days, Windows is really _good_ about
these things; only programs that don't conform to the Windows
conventions have problems, and that'w what I want to avoid.

>> However, Subversion also _creates_ that directory; how does it know
>> which you prefer?
>
>
> Sorry, I wasn't clear. I was saying that if it finds that directory
> is not there, it will check for %HOME%/.subversion as well. That's
> all. So, most of the time it will just use %APPDATA% for people who
> don't care, but if somebody does then they'll move the directory and
> svn will do the right thing.

I see. So you create %HOME%/.subversion before running SVN for the first
time, nad make sure the %APPDATA%/Subversion doesn't exist, and from
that point on things should just work?

Hm.

> From looking at it briefly, it'll be very little code to make this
> change, only a few lines in one function
> (svn_config__user_config_path) and one line in the config_impl.h
> header to do it right.

Oh, no. All of this logic should go into config_win.c, and nowhere else.
It's _different_ than on Unix, even with just the directory check.

> That won't work, .lnk files are handled by the Explorer, not the
>
>> filesystem. However, on Win2k and above, you can make
>> %APPDATA%\Subversion a junction to anywhere you like -- again, not
>> having to change a single line of code in SVN.
>
>
> Except junctions aren't very well documented or supported

Yes, they are, if you look at the right place. Also, the "dir" command
will show junctions.

> and there are reports of filesystem weirdness when using them.

What kind? I've been using them for years, with no percieved weirdness.
The main thing is that they're supported on the filesystem level. The
drawback is that they're NTFS-only, but if you ask me, people who don't
use NTFS are in for trouble anyway.

> Again, I'm happy to write the 10 lines of code and test them and send
> a patch to the HEAD, I just want to know it will be considered before
> I do that. If you're absolutely not interested I won't bother.
> However, I think the feature is sound and this is the best of the
> options.

This discussion is similar to the one about whether the SVN command-line
client should print paths with \ or / as a separator. As always, my
first answer is to conform to the OS native conventions.

What you're proposing complicates the code, but it's just possible that
the complication isn't too big. So, let's see the patch first, and
decide afterwards.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 23 16:12:54 2003

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

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