Changeset 208


Ignore:
Timestamp:
Jul 2, 2007, 5:17:18 PM (17 years ago)
Author:
joergs
Message:

perltidy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dasscm/dasscm

    r205 r208  
    55use strict;
    66
    7 use Env qw($DASSCM_PROD $DASSCM_REPO $USER $DASSCM_USERNAME $DASSCM_USER $DASSCM_PASSWORD);
     7use Env
     8  qw($DASSCM_PROD $DASSCM_REPO $USER $DASSCM_USERNAME $DASSCM_USER $DASSCM_PASSWORD);
    89use Cwd;
    910use Term::ReadKey;
     
    6869    print
    6970      "svn checkout --no-auth-cache --username USERNAME https://dass-it.de/svn/dasscm/HOSTNAME\n";
    70     print
    71       "environment variables\n",
    72       "    DASSCM_REPO\n",
    73       "    DASSCM_PROD¸n",
    74       "    DASSCM_USERNAME\n",
    75       "    DASSCM_PASSWORD\n",
    76       "are evaluated.\n";
     71    print "environment variables\n", "    DASSCM_REPO\n", "    DASSCM_PROD¸n",
     72      "    DASSCM_USERNAME\n", "    DASSCM_PASSWORD\n", "are evaluated.\n";
    7773    print "\n";
    7874}
     
    9187    if ($verbose) { print "DASSCM_PROD: " . $DASSCM_PROD . "\n"; }
    9288
    93 
    9489    # DASSCM_REPOSITORY_NAME
    95         if ( !$DASSCM_REPOSITORY_NAME ) {
    96             die
    97               "Variable DASSCM_REPOSITORY_NAME is not defined.\nIt needs to be a unique name.\nNormally the full qualified host name is used.\nUse file $config_file to configure it.\n";
    98         }
    99 
     90    if ( !$DASSCM_REPOSITORY_NAME ) {
     91        die
     92          "Variable DASSCM_REPOSITORY_NAME is not defined.\nIt needs to be a unique name.\nNormally the full qualified host name is used.\nUse file $config_file to configure it.\n";
     93    }
    10094
    10195    # DASSCM_REPO
     
    117111        if ( not -d $DASSCM_REPO ) {
    118112            die
    119             "Can't access local repository DASSCM_REPO\n($DASSCM_REPO)\nCheck configuration and execute\n    dasscm init\n";
    120         }
    121    
     113              "Can't access local repository DASSCM_REPO\n($DASSCM_REPO)\nCheck configuration and execute\n    dasscm init\n";
     114        }
     115
    122116        #
    123117        # user settings
    124118        #
    125        
     119
    126120        # DASSCM_USER is legacy. Use DASSCM_USERNAME instead
    127         if( !$DASSCM_USERNAME ) {
    128             $DASSCM_USERNAME=$DASSCM_USER;
     121        if ( !$DASSCM_USERNAME ) {
     122            $DASSCM_USERNAME = $DASSCM_USER;
    129123        }
    130124
     
    133127        # otherwise USER can be used
    134128        if ( "$USER" eq "root" ) {
    135             if (( not $DASSCM_USERNAME ) and ( $command ne "login" )) {
     129            if ( ( not $DASSCM_USERNAME ) and ( $command ne "login" ) ) {
    136130                die
    137                 "Envirnonment variable DASSCM_USERNAME not set.\nSet DASSCM_USERNAME to your subversion user account.\n";
     131                  "Envirnonment variable DASSCM_USERNAME not set.\nSet DASSCM_USERNAME to your subversion user account.\n";
    138132            }
    139133            $svnOptions .= " --no-auth-cache ";
     
    145139        # password
    146140        #
    147         if( $DASSCM_PASSWORD ) {
     141        if ($DASSCM_PASSWORD) {
    148142            $svnPasswordCredentials = " --password $DASSCM_PASSWORD ";
    149143        }
     
    205199{
    206200
    207     if( $verbose ) {
     201    if ($verbose) {
    208202        print "run_interactive:" . join( " ", @_ ) . "\n";
    209203    }
     
    301295}
    302296
    303 
    304 
    305297sub init(@)
    306298{
     
    309301
    310302    # update complete repository
    311     my $retcode = run_interactive("cd $DASSCM_LOCAL_REPOSITORY_BASE; $SVN checkout $svnCheckoutCredentials $svnOptions $DASSCM_SVN_REPOSITORY");
    312 }
    313 
     303    my $retcode =
     304      run_interactive(
     305        "cd $DASSCM_LOCAL_REPOSITORY_BASE; $SVN checkout $svnCheckoutCredentials $svnOptions $DASSCM_SVN_REPOSITORY"
     306      );
     307}
    314308
    315309#
     
    361355    $retcode =
    362356      run_interactive(
    363         "$SVN commit $svnOptions --username $DASSCM_USERNAME $svnPasswordCredentials $DASSCM_REPO");
     357        "$SVN commit $svnOptions --username $DASSCM_USERNAME $svnPasswordCredentials $DASSCM_REPO"
     358      );
    364359
    365360    print $filename_prod. "\n";
     
    459454        help(@ARGV);
    460455    } elsif (m/login/i) {
    461         $command ="login";
     456        $command = "login";
    462457        login(@ARGV);
    463458    } elsif (m/init/i) {
    464         $command ="init";
     459        $command = "init";
    465460        init(@ARGV);
    466461    } elsif (m/add/i) {
     
    472467        add(@ARGV);
    473468    } elsif (m/blame/i) {
    474         $command ="blame";
     469        $command = "blame";
    475470        blame(@ARGV);
    476471    } elsif (m/diff/i) {
    477         $command ="diff";
     472        $command = "diff";
    478473        diff(@ARGV);
    479474    } elsif (m/activate/i) {
Note: See TracChangeset for help on using the changeset viewer.