From: Rob H. <for...@us...> - 2002-04-12 19:59:33
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv7091/lib/SandWeb Modified Files: Shell.pm Diff.pm Log Message: added carriage return->linefeed conversions Index: Shell.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Shell.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -U2 -r1.3 -r1.4 --- Shell.pm 11 Apr 2002 22:18:37 -0000 1.3 +++ Shell.pm 12 Apr 2002 19:59:27 -0000 1.4 @@ -58,10 +58,10 @@ if ( $system_username && $system_password ) { if ( $vcs_username && $vcs_password ) { - my @raw_output = split('\n', `$sandweb_expect unix_vcs $system_username $system_password $vcs_password $command`); + my @raw_output = split(/\n/, `$sandweb_expect unix_vcs $system_username $system_password $vcs_password $command`); shift @raw_output; shift @raw_output; $output = join('', @raw_output); } else { - my @raw_output = split('\n', `$sandweb_expect unix $system_username $system_password $command`); + my @raw_output = split(/\n/, `$sandweb_expect unix $system_username $system_password $command`); shift @raw_output; shift @raw_output; @@ -69,5 +69,5 @@ } } elsif ( $vcs_username && $vcs_password ) { - my @raw_output = split('\n', `$sandweb_expect vcs $vcs_password "$command"`); + my @raw_output = split(/\n/, `$sandweb_expect vcs $vcs_password "$command"`); shift @raw_output; shift @raw_output; Index: Diff.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Diff.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -U2 -r1.5 -r1.6 --- Diff.pm 10 Mar 2002 01:56:05 -0000 1.5 +++ Diff.pm 12 Apr 2002 19:59:27 -0000 1.6 @@ -39,4 +39,10 @@ my $input = $self->{'diff'}; + + # convert any carriage returns to linefeeds. + # sandweb-expect strips carriage returns so we need this here. + $raw_output =~ s/^M/\n/g; + my @lined_output = split(/\n/, $raw_output); + my @diff = split(/\n/, $input); |