Subversion Repositories DevTools

Rev

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

Rev 7300 Rev 7322
Line 343... Line 343...
343
#                       revision    - ref to returned revision tag
343
#                       revision    - ref to returned revision tag
344
#                       tag         - ref to URL of the Check In
344
#                       tag         - ref to URL of the Check In
345
#                       replace     - True: Delete existing tag if present
345
#                       replace     - True: Delete existing tag if present
346
#                       cmd         - Error Prefix
346
#                       cmd         - Error Prefix
347
#                       validated   - Locations already validated
347
#                       validated   - Locations already validated
-
 
348
#                       parents     - Create parents as required
348
#
349
#
349
# Returns         : Revision of the copy
350
# Returns         : Revision of the copy
350
#
351
#
351
sub SvnCopy
352
sub SvnCopy
352
{
353
{
Line 386... Line 387...
386
    #   Copy the URLs
387
    #   Copy the URLs
387
    #
388
    #
388
    SvnCmd ($self   , 'copy'
389
    SvnCmd ($self   , 'copy'
389
                    , $old
390
                    , $old
390
                    , $new
391
                    , $new
391
                    , '-m', SvnComment($opt{'comment'},"Copied by $cmd"),
392
                    , '-m', SvnComment($opt{'comment'},"Copied by $cmd")
-
 
393
                    , $opt{parents} ? '--parents' : ''
392
                    , { 'credentials' => 1
394
                    , { 'credentials' => 1
393
                      , 'process' => \&ProcessRevNo
395
                      , 'process' => \&ProcessRevNo
394
                      , 'error' => "$cmd: Source not copied" } );
396
                      , 'error' => "$cmd: Source not copied" } );
395
 
397
 
396
    CalcRmReference($self, $new );
398
    CalcRmReference($self, $new );
Line 682... Line 684...
682
    {
684
    {
683
        #
685
        #
684
        #   Error occurred
686
        #   Error occurred
685
        #   If the path does not exist then this is an error that
687
        #   If the path does not exist then this is an error that
686
        #   we can handle. The path does not exist in the Repository
688
        #   we can handle. The path does not exist in the Repository
-
 
689
        #   
-
 
690
        #   Note: Different version of SVN / SVN server generate different
-
 
691
        #         messages. Check many
687
        #
692
        #
-
 
693
        foreach my $umsg ( @{$self->{ERROR_LIST}})
-
 
694
        {
688
        return 0
695
            return 0
689
            if (    $self->{ERROR_LIST}[0] =~ m~' non-existent in that revision$~
696
                if (    $umsg =~ m~' non-existent in that revision$~
690
                 || $self->{ERROR_LIST}[0] =~ m~' non-existent in revision ~
697
                     || $umsg =~ m~' non-existent in revision ~
691
                 || $self->{ERROR_LIST}[0] =~ m~: No repository found in '~
698
                     || $umsg =~ m~: No repository found in '~
692
                 || $self->{ERROR_LIST}[0] =~ m~: Error resolving case of '~
699
                     || $umsg =~ m~: Error resolving case of '~
-
 
700
                     || $umsg =~ m~: W160013:~
-
 
701
                     || $umsg =~ m~: E200009:~
693
                );
702
                    );
694
 
703
        }
695
        Error ("$cmd: Unexpected error", @{$self->{ERROR_LIST}});
704
        Error ("$cmd: Unexpected error", @{$self->{ERROR_LIST}});
696
    }
705
    }
697
    return 1;
706
    return 1;
698
}
707
}
699
 
708
 
Line 857... Line 866...
857
#                       printdata   - Print data
866
#                       printdata   - Print data
858
#                       error       - Error Message
867
#                       error       - Error Message
859
#                                     Used as first line of an Error call
868
#                                     Used as first line of an Error call
860
#
869
#
861
# Returns         : non-zero on errors detected
870
# Returns         : non-zero on errors detected
862
#                   Aurthentication errors are detected and always reported
871
#                   Authentication errors are detected and always reported
863
#
872
#
864
sub SvnCmd
873
sub SvnCmd
865
{
874
{
866
    my $self = shift;
875
    my $self = shift;
867
    Debug ("SvnCmd");
876
    Debug ("SvnCmd");
Line 882... Line 891...
882
    #   All commands are non-interactive, prepend argument
891
    #   All commands are non-interactive, prepend argument
883
    #   Accept serve certs. Only applies to https connections. VisualSvn
892
    #   Accept serve certs. Only applies to https connections. VisualSvn
884
    #   perfers https and it uses self-signed certificates.
893
    #   perfers https and it uses self-signed certificates.
885
    #
894
    #
886
    unshift @_, '--non-interactive', '--trust-server-cert';
895
    unshift @_, '--non-interactive', '--trust-server-cert';
-
 
896
 
-
 
897
    # Remove empty arguments.
-
 
898
    @_ = grep { $_ ne '' } @_;
887
    Verbose2 "SvnCmd $svn @_";
899
    Verbose2 "SvnCmd $svn @_";
888
 
900
 
889
    #
901
    #
890
    #   Prepend credentials, but don't show to users
902
    #   Prepend credentials, but don't show to users
891
    #
903
    #
Line 961... Line 973...
961
            #
973
            #
962
            next if ($data =~ m~^QDBusConnection:~);
974
            next if ($data =~ m~^QDBusConnection:~);
963
            push @{$self->{ERROR_LIST}}, $data;
975
            push @{$self->{ERROR_LIST}}, $data;
964
            $authenicationError = 1 if ( $data =~ m~Could not authenticate~i );
976
            $authenicationError = 1 if ( $data =~ m~Could not authenticate~i );
965
            $authenicationError = 1 if ( $data =~ m~E215004: Authentication failed~i );
977
            $authenicationError = 1 if ( $data =~ m~E215004: Authentication failed~i );
-
 
978
            $authenicationError = 1 if ( $data =~ m~E215004: No more credentials~i );
966
        }
979
        }
967
        else
980
        else
968
        {
981
        {
969
            #
982
            #
970
            #   Process STDOUT data
983
            #   Process STDOUT data