Update of /cvsroot/sandweb/sandweb/bin
In directory usw-pr-cvs1:/tmp/cvs-serv31651/bin
Modified Files:
sandweb.cgi
Log Message:
edit and unedit should only call vcs_output.html if there is an error,
as they normally have no output
Index: sandweb.cgi
===================================================================
RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v
retrieving revision 1.224
retrieving revision 1.225
diff -U2 -r1.224 -r1.225
--- sandweb.cgi 25 Feb 2002 23:52:24 -0000 1.224
+++ sandweb.cgi 26 Feb 2002 00:12:52 -0000 1.225
@@ -1714,5 +1714,50 @@
exit 0;
}
- else {
+ #
+ # we only need to show a template for these vcs commands if
+ # there is an error. they normally have no output.
+ #
+ elsif ( $vcs_command eq 'edit' || $vcs_command eq 'unedit' ) {
+ # can't give the leading / to the VCS
+ $location =~ s/\///;
+
+ foreach my $file (@filename) {
+ %return = $repository->$vcs_command(
+ file => "$file",
+ message => "$message",
+ );
+ push (@vcs_output, "$return{'output'}\n");
+ push (@vcs_error, "$return{'error'}\n");
+ }
+
+ my $content = $ui->get_menu(
+ MENU => 'vcs_output',
+ LOCATION => $location,
+ FILENAME => @filename,
+ PROGNAME => $progname,
+ VCS_OUTPUT => join('', @vcs_output),
+ VCS_ERROR => join('', @vcs_error),
+ );
+
+ if ( $return{'error'} ) {
+ print CGI::header( -cookie => $ck_auth );
+ $ui->print_screen(
+ TITLE=> "SandWeb : VCS $vcs_command",
+ MENU_TITLE => 'SandWeb',
+ SUBMENU_TITLE => "VCS $vcs_command",
+ FOOTER => '',
+ CONTENT => $content,
+ ERROR => $error,
+ );
+ } else {
+ set_error("VCS $vcs_command on @filename");
+ browse_module_menu(
+ ck_auth => $ck_auth,
+ location => $location,
+ module_name => $module_name,
+ repo_name => $repo_name,
+ );
+ }
+ } else {
# this is where the Repository object is used
# can't give the leading / to the VCS
|