Hi Jack,
> Hi all,
> I'm having trouble with svn_load_dirs.pl on Windows XP. I get the
> following error message:
>
> C:\temp>perl svn_load_dirs.pl http://pc233/svn/test import
> c:/software/hw70/Hyper
> Checking that the base URL is a Subversion repository.
> Running C:/Program Files/Subversion/bin/svn log -r HEAD
> http://pc233/svn/test
> '-' is not recognized as an internal or external command,
> operable program or batch file.
> svn_load_dirs.pl: C:/Program Files/Subversion/bin/svn log -r HEAD
> http://pc233/svn/test failed with this output:
>
> Press return to quit and clean up svn working directory:
>
> I hacked in the path to subversion which seemed to be the only
> change configure needed to make (I don't have configure on my
> PC).
Interesting timing. We're just working through that ourselves.
The problem here is the following line in safe_read_from_pipe:
my $pid = open(SAFE_READ, '-|');
Open to '-|' only works with full Unix forks, which we ain't got on
Windows (at least not with ActiveState Perl 5.8.3 - and probably not
ever).
We got a bit further by changing that line to
my $pid = open(SAFE_READ, '@_ |');
and adding
unless (defined $temp_dir and length $temp_dir) {
$temp_dir = $ENV{TEMP};
}
after
my $temp_dir = $ENV{TMPDIR};
(TMPDIR isn't in the default environment on Windows, TEMP is), but we're
now hitting a problem with
my $pid = open(SAFE_READ, '@_ |');
with a multi-line command.
Here's the patch so far - but it still doesn't work...
@@ -341,6 +341,9 @@
# Create a temporary directory for svn to work in.
my $temp_dir = $ENV{TMPDIR};
unless (defined $temp_dir and length $temp_dir) {
+ $temp_dir = $ENV{TEMP};
+}
+unless (defined $temp_dir and length $temp_dir) {
$temp_dir = '/tmp';
}
my $temp_template = "$temp_dir/svn_load_dirs_XXXXXXXXXX";
@@ -1418,7 +1421,7 @@
croak "$0: safe_read_from_pipe $INCORRECT_NUMBER_OF_ARGS";
}
print "Running @_\n";
- my $pid = open(SAFE_READ, '-|');
+ my $pid = open(SAFE_READ, "@_ |");
unless (defined $pid)
{
die "$0: cannot fork: $!\n";
I'll post a full patch once we get it working (he says
optimistically...)
Cheers,
Ian Brockbank
Senior Applications Software Engineer
e: ian.brockbank@wolfsonmicro.com / apps@wolfsonmicro.com
scd: ian@scottishdance.net
t: +44 131 272 7145
f: +44 131 272 7001
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Apr 27 16:25:45 2004