0

在 Windows 上将 svn_load_dirs.pl 与 ubersvn 一起使用时 - $ENV{HOME} 的路径在哪里。

在 svn_load_dirs.pl 代码中 $ENV{HOME} 没有定义。我的系统上也没有定义它。它应该在哪里?

我的猜测是它将是 UberSVN 安装的位置:C:\Program Files (x86)\WANdisco\uberSVN

但是 svn_load_dirs.pl 代码在子路径上添加:$ENV{HOME}/.subversion/config

C:\Program Files (x86)\WANdisco\uberSVN 下不存在文件夹/目录路径 .subversion/config

所以我被卡住了,因为如果没有正确设置,我认为 svn_load_dirs.pl 脚本不能在 Windows 上与 UberSVN 一起正常工作。

4

1 回答 1

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

于 2011-10-17T09:30:09.810 回答