- Timestamp:
- Jul 2, 2007, 5:17:18 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dasscm/dasscm
r205 r208 5 5 use strict; 6 6 7 use Env qw($DASSCM_PROD $DASSCM_REPO $USER $DASSCM_USERNAME $DASSCM_USER $DASSCM_PASSWORD); 7 use Env 8 qw($DASSCM_PROD $DASSCM_REPO $USER $DASSCM_USERNAME $DASSCM_USER $DASSCM_PASSWORD); 8 9 use Cwd; 9 10 use Term::ReadKey; … … 68 69 print 69 70 "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"; 77 73 print "\n"; 78 74 } … … 91 87 if ($verbose) { print "DASSCM_PROD: " . $DASSCM_PROD . "\n"; } 92 88 93 94 89 # 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 } 100 94 101 95 # DASSCM_REPO … … 117 111 if ( not -d $DASSCM_REPO ) { 118 112 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 122 116 # 123 117 # user settings 124 118 # 125 119 126 120 # 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; 129 123 } 130 124 … … 133 127 # otherwise USER can be used 134 128 if ( "$USER" eq "root" ) { 135 if ( ( not $DASSCM_USERNAME ) and ( $command ne "login" )) {129 if ( ( not $DASSCM_USERNAME ) and ( $command ne "login" ) ) { 136 130 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"; 138 132 } 139 133 $svnOptions .= " --no-auth-cache "; … … 145 139 # password 146 140 # 147 if ( $DASSCM_PASSWORD) {141 if ($DASSCM_PASSWORD) { 148 142 $svnPasswordCredentials = " --password $DASSCM_PASSWORD "; 149 143 } … … 205 199 { 206 200 207 if ( $verbose ) {201 if ($verbose) { 208 202 print "run_interactive:" . join( " ", @_ ) . "\n"; 209 203 } … … 301 295 } 302 296 303 304 305 297 sub init(@) 306 298 { … … 309 301 310 302 # 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 } 314 308 315 309 # … … 361 355 $retcode = 362 356 run_interactive( 363 "$SVN commit $svnOptions --username $DASSCM_USERNAME $svnPasswordCredentials $DASSCM_REPO"); 357 "$SVN commit $svnOptions --username $DASSCM_USERNAME $svnPasswordCredentials $DASSCM_REPO" 358 ); 364 359 365 360 print $filename_prod. "\n"; … … 459 454 help(@ARGV); 460 455 } elsif (m/login/i) { 461 $command = "login";456 $command = "login"; 462 457 login(@ARGV); 463 458 } elsif (m/init/i) { 464 $command = "init";459 $command = "init"; 465 460 init(@ARGV); 466 461 } elsif (m/add/i) { … … 472 467 add(@ARGV); 473 468 } elsif (m/blame/i) { 474 $command = "blame";469 $command = "blame"; 475 470 blame(@ARGV); 476 471 } elsif (m/diff/i) { 477 $command = "diff";472 $command = "diff"; 478 473 diff(@ARGV); 479 474 } elsif (m/activate/i) {
Note:
See TracChangeset
for help on using the changeset viewer.