Changeset 214 for trunk/dasscm/dasscm
- Timestamp:
- Jul 3, 2007, 2:10:55 PM (17 years ago)
- Location:
- trunk/dasscm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dasscm
-
Property svn:ignore
set to
Changes
ChangeLog
-
Property svn:ignore
set to
-
trunk/dasscm/dasscm
r209 r214 8 8 qw($DASSCM_PROD $DASSCM_REPO $USER $DASSCM_USERNAME $DASSCM_USER $DASSCM_PASSWORD); 9 9 use Cwd; 10 use POSIX qw/getpgrp tcgetpgrp/; 11 use Term::ReadKey; 10 use Getopt::Long; 12 11 use File::Basename; 13 12 use File::Compare; … … 16 15 use File::stat; 17 16 use File::Path; 18 use Getopt::Long;17 use Term::ReadKey; 19 18 20 19 # … … 30 29 31 30 my $config_file = "/etc/dasscm.conf"; 32 33 # my $config = SmartClient::Config->( $config_file ); 34 my $config = ConfigFile::read_config_file($config_file); 31 my $config = ConfigFile::read_config_file($config_file); 35 32 my $DASSCM_LOCAL_REPOSITORY_BASE; 36 33 my $DASSCM_REPOSITORY_NAME; … … 69 66 print " add <filename>\n"; 70 67 print " commit <filename>\n"; 68 print " status <filename>\n"; 71 69 print " diff <filename>\n"; 72 70 print " help <subcommand>\n"; … … 76 74 print 77 75 "svn checkout --no-auth-cache --username USERNAME https://dass-it.de/svn/dasscm/HOSTNAME\n"; 78 print "environment variables\n", " DASSCM_REPO\n", " DASSCM_PROD ¸n",76 print "environment variables\n", " DASSCM_REPO\n", " DASSCM_PROD\n", 79 77 " DASSCM_USERNAME\n", " DASSCM_PASSWORD\n", "are evaluated.\n"; 80 78 print "\n"; … … 174 172 my $basename = basename($filename_prod); 175 173 176 print "dir: " . $dirname_prod . "\n"; 177 print "fn: " . $basename . "\n"; 174 if ($verbose) { 175 print "dir: " . $dirname_prod . "\n"; 176 print "fn: " . $basename . "\n"; 177 } 178 178 179 179 my $dirname_repo = $DASSCM_REPO . "/" . $dirname_prod; … … 301 301 } else { 302 302 print "help for @_: ...\n"; 303 usage(); 303 304 } 304 305 } … … 309 310 check_env(); 310 311 311 my $output_username = ""; 312 if ($DASSCM_USERNAME) { 313 $output_username = " ($DASSCM_USERNAME)"; 314 } 315 316 print "Enter DASSCM user name", $output_username, ": "; 317 my $input_username = <STDIN>; 318 chomp($input_username); 312 my $input_username = $1; 313 314 if ( not $input_username ) { 315 my $output_username = ""; 316 if ($DASSCM_USERNAME) { 317 $output_username = " ($DASSCM_USERNAME)"; 318 } 319 320 print "Enter DASSCM user name", $output_username, ": "; 321 $input_username = <STDIN>; 322 chomp($input_username); 323 } 319 324 320 325 # hidden password input … … 530 535 531 536 # get command line options and store them in options hash 532 my $result = GetOptions( \%options, ' message=s' );537 my $result = GetOptions( \%options, 'verbose', 'message=s' ); 533 538 534 539 # print options … … 537 542 } 538 543 544 # set verbose to command line option 545 $verbose = $options{'verbose'}; 546 547 # 548 # action accordinly to command are taken 549 # $command is rewritten in standard format, 550 # so we can test for it later on more simply 551 # 539 552 $_ = $command; 540 553 if (m/help/i) { … … 547 560 init(@ARGV); 548 561 } elsif (m/add/i) { 549 ## rewrite command550 562 $command = "add"; 551 563 add(@ARGV); … … 562 574 $command = "status"; 563 575 status(@ARGV); 564 } elsif (m/activate/i) { 565 ## TODO 566 activate(@ARGV); 576 577 # } elsif (m/activate/i) { 578 # ## TODO 579 # activate(@ARGV); 567 580 } else { 568 581 usage(); … … 574 587 # commitall 575 588 # revert 576 # status (chkconf) 577 } 589 }
Note:
See TracChangeset
for help on using the changeset viewer.