0

When using svn_load_dirs.pl with ubersvn on Windows - where is the path $ENV{HOME} meant to be.

In the svn_load_dirs.pl code $ENV{HOME} is not defined. It is not already defined on my system either. Where is it meant to be?

My guess is that it would be the location of the UberSVN install: C:\Program Files (x86)\WANdisco\uberSVN

HOWEVER the svn_load_dirs.pl code tacks on a sub path: $ENV{HOME}/.subversion/config

folder/directory path .subversion/config does not exist beneath C:\Program Files (x86)\WANdisco\uberSVN

So I am stuck because I don't think that the svn_load_dirs.pl script can work correctly with UberSVN on Windows without this setup correctly.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
therobyouknow
  • 6,604
  • 13
  • 56
  • 73

1 Answers1

1

$ENV{HOME} should refer to the current user's home directory. On Windows Vista/7 this is "C:\Users\USER-NAME\" and on older versions of Windows it would be "C:\Documents and Settings\USER-NAME\"

Here is a perl script which might fix your problem with the script not getting the $ENV{HOME} value:

BEGIN {
if ( substr ( $^O, 0, 5 ) eq q{MSWin} ) {
if ( $ENV{HOME} ) {
# leave as is
}
elsif ( $ENV{USERPROFILE} ) {
$ENV{HOME} = $ENV{USERPROFILE};
}
elsif ( $ENV{HOMEDRIVE} and $ENV{HOMEPATH} ) {
$ENV{HOME} = $ENV{HOMEDRIVE} . $SENV{HOMEPATH};
}
else {
$ENV{HOME} = '.';
} } }

However, according to this SVN documentation page, the configuration for SubVersion is located in the registry and not on the file system. So I guess the script will need to be updated to work on Windows:

Subversion clients running on Windows platforms may also use the Windows Registry to hold the configuration data

jonjbar
  • 3,896
  • 1
  • 25
  • 46
  • +1 thanks @John Riche. Your solution would help make svn_load_dirs.pl portable across Linux, Windows, Mac OS. For the UberSVN Windows Subversion solution, their staff advise of the path here: http://www.svnforum.org/threads/40447-using-svn_load_dirs.pl-with-ubersvn-on-Windows-where-is-the-path-ENV-HOME?p=116331&viewfull=1#post116331 Together with your solution, the code can be modified to be portable. Thanks again. – therobyouknow Oct 17 '11 at 16:04