Changeset 895
- Timestamp:
- Jun 26, 2010, 3:11:21 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dasscm/trunk/usr/bin/dasscm
r894 r895 112 112 'commit' => { 113 113 'desc' => [], 114 ## TODO: only modified files 114 115 'params' => ["PATH_REPO"], 115 116 'options' => [ 'verbose', 'message=s' ], … … 1582 1583 map { m/^$input/ && print $_, "\n" } ( keys %COMMANDS ); 1583 1584 } else { 1584 1585 1585 # complete dasscm parameter 1586 1586 my $command = get_command_uniform_name( $input[0] ); 1587 my @params = get_command_possible_params( $input[0] ); 1588 if ($verbose) { print "params: ", Dumper(@params); } 1589 1590 # arg 1: dasscm 1591 # arg 2: command 1592 # arg 3-x: parameter, therefore parameter_number = $number_arguments - 2 1593 my $parameter_number = $number_arguments - 2; 1594 if ( defined( $params[$parameter_number] ) 1595 && $params[$parameter_number] ) 1596 { 1597 my $param = $params[$parameter_number]; 1598 if ($verbose) { print "param used: ", $param, "\n"; } 1599 if ( $param eq "PATH_PROD" ) { 1600 complete_path( $input[ $number_arguments - 1 ] ); 1601 } elsif ( $param eq "PATH_REPO" ) { 1602 complete_repopath( $input[ $number_arguments - 1 ] ); 1587 if( $command ) { 1588 # remove command 1589 shift @input; 1590 1591 # check and remove options 1592 my @options = get_command_possible_options( $command ); 1593 if( ( not @options ) || ( GetOptionsFromArray( \@input, \%options_complete, @options ) ) ) { 1594 1595 my @params = get_command_possible_params( $command ); 1596 if ($verbose) { print "params: ", Dumper(@params); } 1597 1598 my $number_arguments = @input; 1599 1600 #print "input: ", join( ",", @input ), " (", $number_arguments, ")\n"; 1601 1602 if( $number_arguments > 0 ) { 1603 my $parameter_number = $number_arguments - 1; 1604 if ( defined( $params[$parameter_number] ) 1605 && $params[$parameter_number] ) 1606 { 1607 my $param = $params[$parameter_number]; 1608 if ($verbose) { print "param used: ", $param, "\n"; } 1609 if ( $param eq "PATH_PROD" ) { 1610 complete_path( $input[ $number_arguments - 1 ] ); 1611 } elsif ( $param eq "PATH_REPO" ) { 1612 complete_repopath( $input[ $number_arguments - 1 ] ); 1613 } 1614 } 1615 } 1603 1616 } 1604 1617 }
Note:
See TracChangeset
for help on using the changeset viewer.