From: Rob H. <for...@us...> - 2003-06-01 10:04:48
|
Update of /cvsroot/sandweb/sandweb/bin In directory sc8-pr-cvs1:/tmp/cvs-serv3030 Modified Files: sandweb.cgi Log Message: merged tag/branch fixed from release branch Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.352 retrieving revision 1.353 diff -U2 -r1.352 -r1.353 --- sandweb.cgi 1 Jun 2003 07:16:13 -0000 1.352 +++ sandweb.cgi 1 Jun 2003 10:04:45 -0000 1.353 @@ -242,6 +242,9 @@ # whether or not this is a submenu my $submenu = $cgi->param('submenu') || ''; + # whether or not this is the final submenu + my $submenu_final = $cgi->param('submenu_final') || ''; $log->debug("submenu: $submenu\n"); + $log->debug("submenu_final: $submenu_final\n"); $log->debug("action: $action - submit: $submit"); $log->debug("module_description: $module_description\n"); @@ -323,5 +326,12 @@ } + my %params; + + if ( $cgi->param('params')) { + %params = $cgi->param('params'), + } + if ( $vcs_command eq "tag" ) { + $log->debug("called tag.."); my $tag_sync = $cgi->param('tag_sync') || ''; my $tag_switch = $cgi->param('tag_switch') || ''; @@ -330,5 +340,7 @@ my $create_tag = $cgi->param('create_tag') || ''; my $remove_tag = $cgi->param('remove_tag') || ''; - if ($submenu) { + + if (($submenu == 1) + && ($submenu_final != 1)){ tag_commit( ck_auth => $ck_auth, @@ -345,7 +357,8 @@ location => $location, submenu => $submenu, + submenu_final => 1, ); exit; - } else { + } elsif ($submenu_final != 1){ tag_menu( ck_auth => $ck_auth, @@ -357,5 +370,4 @@ exit; } - exit; } @@ -367,5 +379,8 @@ my $create_branch = $cgi->param('create_branch') || ''; my $remove_branch = $cgi->param('remove_branch') || ''; - if ($submit) { + + if (($submenu == 1) + && ($submenu_final != 1)){ + $log->debug("branch commit.."); branch_commit( ck_auth => $ck_auth, @@ -381,6 +396,9 @@ filename => \@filename, location => $location, + submenu_final => 1, ); - } else { + exit; + } elsif ($submenu_final != 1){ + $log->debug("branch menu.."); branch_menu( ck_auth => $ck_auth, @@ -390,6 +408,6 @@ location => $location, ); + exit; } - exit; } @@ -399,4 +417,5 @@ vcs_command => $vcs_command, module_name => $module_name, + params => \%params, repo_name => $repo_name, repo_password => $repo_password, @@ -960,7 +979,7 @@ ); - $log->debug("current_location: ".$location); - my %localstatus = $repository->status(file => ".", recurse => "false" ); - my @localstatusoutput=$localstatus{output}; + $log->debug("current_location: ".$location); + my %localstatus = $repository->status(file => ".", recurse => "false" ); + my @localstatusoutput=$localstatus{output}; my %browser = $browse->get_browser( @@ -1911,6 +1930,13 @@ my $main_window_url = $args{'main_window_url'} || ''; my $submenu = $args{'submenu'} || ''; + my $submenu_final = $args{'submenu_final'} || ''; $log->debug("submenu in vcs_menu : $submenu"); my @filename_loop = (); + my @params_loop = (); + # dereference params hash, turn into array + my @params_array; + if ($params){ + @params_array = %$params; + } my $count = 0; @@ -1938,4 +1964,22 @@ } + $count = 0; + while ( @params_array->[$count] ) { + # build loop to pass params through template + # + my %entry; + $entry{'PARAMS'} = @params_array->[$count]; + push (@params_loop, \%entry); + $count++; + } + + my @params= (); + $count = 0; + + while ( @params_array->[$count] ) { + push (@params, @params_array->[$count]); + $count++; + } + unless ( @filename || @filename eq '.' ) { $log->debug("no file was selected for vcs action"); @@ -1946,4 +1990,5 @@ PROGNAME => $progname, SUBMENU => $submenu, + SUBMENU_FINAL => $submenu_final, OUTPUT => "Please select file(s) or folder(s) to perform vcs action on", ERROR => "No file(s) or folder(s) selected", @@ -1987,4 +2032,5 @@ LOCATION => $location, FILENAME_LOOP => \@filename_loop, + PARAMS_LOOP => \@params_loop, VCS_COMMAND => $vcs_command, VCS_MESSAGE => $vcs_message, @@ -1994,4 +2040,5 @@ IMAGE_DIR => $image_dir, SUBMENU => $submenu, + SUBMENU_FINAL => $submenu_final, ); print $cgi->header( -cookie => $ck_auth ); @@ -2591,8 +2638,10 @@ } + $log->debug("in vcs_commit"); $log->debug("module_name: $module_name"); $log->debug("username: $username"); $log->debug("location: $location"); $log->debug("main_window_url: $main_window_url"); + $log->debug("params: ".Dumper(%params)); my $repo_server = $user->get_repo_server(repo => $repo_name); @@ -2667,4 +2716,8 @@ $log->debug("Filename(s): @filename"); + if ( $vcs_command eq 'branch' ) { + $vcs_command = 'tag'; + } + if ( $vcs_command eq 'commit' ) { if ($message) { @@ -3194,4 +3247,5 @@ my $repo_name = $args{'repo_name'}; my $submenu = $args{'submenu'} || ''; + my $submenu_final = $args{'submenu_final'} || ''; my $prev_url = "$ENV{'HTTP_REFERER'}"; $log->debug("prev_url $prev_url"); @@ -3205,4 +3259,5 @@ my $remove_tag = $args{'remove_tag'} || ''; + $log->debug("in tag_commit"); $log->debug("module_name: $module_name"); $log->debug("username: $username"); @@ -3242,4 +3297,5 @@ repo_password => $repo_password, submenu => $submenu, + submenu_final => $submenu_final, filename => \@filename, location => $location, @@ -3261,4 +3317,5 @@ repo_name => $repo_name, submenu => $submenu, + submenu_final => $submenu_final, repo_password => $repo_password, filename => \@filename, @@ -3280,4 +3337,5 @@ repo_name => $repo_name, submenu => $submenu, + submenu_final => $submenu_final, repo_password => $repo_password, filename => \@filename, @@ -3301,4 +3359,5 @@ repo_password => $repo_password, submenu => $submenu, + submenu_final => $submenu_final, filename => \@filename, location => $location, @@ -3315,4 +3374,5 @@ $log->debug("submenu passed from create_tag: $submenu"); + $log->debug("cvs params passed: $create_tag"); vcs_menu( ck_auth => $ck_auth, @@ -3322,4 +3382,5 @@ repo_password => $repo_password, submenu => $submenu, + submenu_final => $submenu_final, filename => \@filename, location => $location, @@ -3342,4 +3403,5 @@ repo_password => $repo_password, submenu => $submenu, + submenu_final => $submenu_final, filename => \@filename, location => $location, @@ -3420,4 +3482,5 @@ my $prev_url = "$ENV{'HTTP_REFERER'}"; my $submenu = $args{'submenu'} || ''; + my $submenu_final = $args{'submenu_final'} || ''; $log->debug("prev_url $prev_url"); my %return; @@ -3430,4 +3493,5 @@ my $remove_branch = $args{'remove_branch'} || ''; + $log->debug("in branch_commit"); $log->debug("module_name: $module_name"); $log->debug("username: $username"); @@ -3467,4 +3531,5 @@ repo_password => $repo_password, submenu => $submenu, + submenu_final => $submenu_final, filename => \@filename, location => $location, @@ -3472,4 +3537,5 @@ main_window_url => $main_window_url, ); + exit; } if ($branch_switch) { @@ -3487,8 +3553,10 @@ filename => \@filename, submenu => $submenu, + submenu_final => $submenu_final, location => $location, params => \%params, main_window_url => $main_window_url, ); + exit; } if ($trunk_sync) { @@ -3504,4 +3572,5 @@ repo_password => $repo_password, submenu => $submenu, + submenu_final => $submenu_final, filename => \@filename, location => $location, @@ -3509,4 +3578,5 @@ main_window_url => $main_window_url, ); + exit; } if ($trunk_switch) { @@ -3523,4 +3593,5 @@ repo_password => $repo_password, submenu => $submenu, + submenu_final => $submenu_final, filename => \@filename, location => $location, @@ -3528,4 +3599,5 @@ main_window_url => $main_window_url, ); + exit; } @@ -3538,9 +3610,10 @@ vcs_menu( ck_auth => $ck_auth, - vcs_command => 'tag', + vcs_command => 'branch', module_name => $module_name, repo_name => $repo_name, repo_password => $repo_password, submenu => $submenu, + submenu_final => $submenu_final, filename => \@filename, location => $location, @@ -3548,4 +3621,5 @@ main_window_url => $main_window_url, ); + exit; } if ($remove_branch) { @@ -3557,9 +3631,10 @@ vcs_menu( ck_auth => $ck_auth, - vcs_command => 'tag', + vcs_command => 'branch', module_name => $module_name, repo_name => $repo_name, repo_password => $repo_password, submenu => $submenu, + submenu_final => $submenu_final, filename => \@filename, location => $location, @@ -3567,4 +3642,5 @@ main_window_url => $main_window_url, ); + exit; } |