Subversion Repositories DevTools

Rev

Rev 2049 | Rev 2764 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2049 Rev 2429
Line 529... Line 529...
529
#                   $url                - Path or URL to get Info on
529
#                   $url                - Path or URL to get Info on
530
#                   $tag                - Name of tag within $self to store data
530
#                   $tag                - Name of tag within $self to store data
531
#                                         Currently InfoWs and InfoRepo
531
#                                         Currently InfoWs and InfoRepo
532
#
532
#
533
# Returns         : Non Zero if errors detected
533
# Returns         : Non Zero if errors detected
-
 
534
#                   Authentication errors are always reported
534
#
535
#
535
sub SvnInfo
536
sub SvnInfo
536
{
537
{
537
    my ($self, $url, $tag) = @_;
538
    my ($self, $url, $tag) = @_;
538
    Error ("Internal: SvnInfo. No Tag provided") unless ( defined $tag );
539
    Error ("Internal: SvnInfo. No Tag provided") unless ( defined $tag );
Line 856... Line 857...
856
#                       printdata   - Print data
857
#                       printdata   - Print data
857
#                       error       - Error Message
858
#                       error       - Error Message
858
#                                     Used as first line of an Error call
859
#                                     Used as first line of an Error call
859
#
860
#
860
# Returns         : non-zero on errors detected
861
# Returns         : non-zero on errors detected
-
 
862
#                   Aurthentication errors are detected and always reported
861
#
863
#
862
sub SvnCmd
864
sub SvnCmd
863
{
865
{
864
    my $self = shift;
866
    my $self = shift;
865
    Debug ("SvnCmd");
867
    Debug ("SvnCmd");
-
 
868
    my $authenicationError;
866
    
869
    
867
    #
870
    #
868
    #   Extract arguments and options
871
    #   Extract arguments and options
869
    #   If last argument is a hesh, then its a hash of options
872
    #   If last argument is a hesh, then its a hash of options
870
    #
873
    #
Line 955... Line 958...
955
        {
958
        {
956
            #
959
            #
957
            #   Process STDERR output
960
            #   Process STDERR output
958
            #
961
            #
959
            push @{$self->{ERROR_LIST}}, $data;
962
            push @{$self->{ERROR_LIST}}, $data;
-
 
963
            $authenicationError = 1 if ( $data =~ m~Could not authenticate~i );
960
        }
964
        }
961
        else
965
        else
962
        {
966
        {
963
            #
967
            #
964
            #   Process STDOUT data
968
            #   Process STDOUT data
Line 971... Line 975...
971
            #   be taken as a signal to kill the command.
975
            #   be taken as a signal to kill the command.
972
            #
976
            #
973
            if ( exists ($opt->{'process'}) && $opt->{'process'}($self, $data) )
977
            if ( exists ($opt->{'process'}) && $opt->{'process'}($self, $data) )
974
            {
978
            {
975
                kill 9, $pid;
979
                kill 9, $pid;
-
 
980
                sleep(1);
976
                last;
981
                last;
977
            }
982
            }
978
        }
983
        }
979
    }
984
    }
980
 
985
 
Line 985... Line 990...
985
    #   Under Windows if this is not done then we eventually fill up some
990
    #   Under Windows if this is not done then we eventually fill up some
986
    #   perl-internal structure and can't spawn anymore processes.
991
    #   perl-internal structure and can't spawn anymore processes.
987
    #
992
    #
988
    my $rv = waitpid ( $pid, 0);
993
    my $rv = waitpid ( $pid, 0);
989
 
994
 
-
 
995
    #   Always process authentication errors
-
 
996
    #
-
 
997
    #   Spell out authentication errors
-
 
998
    #   Appears that some users can't read manuals - let hope they can read screen
-
 
999
    #
-
 
1000
    if ( $opt->{'error'} && $authenicationError )
-
 
1001
    {
-
 
1002
        $opt->{'error'} = 'Authentication Error';
-
 
1003
        $self->{ERROR_LIST} = [];
-
 
1004
        push @{$self->{ERROR_LIST}}
-
 
1005
            ,'=' x 80,
-
 
1006
            ,'User must manually authenticate against the repository.'
-
 
1007
            ,'Use \'svn ls --depth empty ' . $self->Full() . '\''
-
 
1008
            ,'Enter your Windows Credentials when prompted and save the password'
-
 
1009
            ,'=' x 80,
-
 
1010
            ;
-
 
1011
    }
-
 
1012
 
990
    #
1013
    #
991
    #   If an error condition was detected and the user has provided
1014
    #   If an error condition was detected and the user has provided
992
    #   an error message, then display the error
1015
    #   an error message, then display the error
993
    #
1016
    #
994
    #   This simplifies the user error processing
1017
    #   This simplifies the user error processing