[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: Chris Hecker <checker_at_d6.com>
Date: 2003-06-23 12:09:01 CEST

>Exactly. Unix ports. Subversion on Windows is _not_ a Unix port, believe
>it or not.

Sure, that's why I put the parenthetical comment in there. My point is
there's going to be a high correlation between people who have %HOME%
defined and people who use svn.exe. But anyway, I'm not saying to break
the old way, I'm saying to check for the new way in addition. I don't
think it will be much code. And, as a side benefit, the 8 zillion comments
in the code referring to ~/.subversion will suddenly be optionally
applicable to Win32 (since you're _not_ a unix port, this might appeal to
you :).

>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? But
even if it did work, it's not what you want; you don't want a huge slew of
random windows apps writing into your home directory, you want your
"unix-like" command line tools to do so. So, this should be a subversion
specific thing, I think.

>Note that
>%HOME% is not a standard env. var on Windows, so you're proposing a
>"new" variable in any case. :-)
>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.

 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.

>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 and there are
reports of filesystem weirdness when using them. The .lnk suggestion was
because a number of windows apps are starting to parse .lnk as a symbolic
link transparently since junctions aren't first class citizens. It's not
hard, but it is more windows cruft. The directory check is way simpler and
cleaner, I think.

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.

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 23 12:10:04 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.