diff --git a/mozilla/webtools/bonsai/cvsquery.cgi b/mozilla/webtools/bonsai/cvsquery.cgi index cf2b39e7f0d..bdb0a629954 100755 --- a/mozilla/webtools/bonsai/cvsquery.cgi +++ b/mozilla/webtools/bonsai/cvsquery.cgi @@ -31,14 +31,21 @@ $| = 1; $sm_font_tag = ""; -print "Content-type: text/html +my $generateBackoutCVSCommands = 0; +if (defined $form{'generateBackoutCVSCommands'}) { + $generateBackoutCVSCommands = 1; +} + +if (!$generateBackoutCVSCommands) { + print "Content-type: text/html "; -$script_str=''; -&setup_script; + $script_str=''; + &setup_script; -print "$script_str"; + print "$script_str"; +} #print "
";
 
@@ -164,8 +171,25 @@ my $menu = "
 Modify Query
 
Mail everyone on this page ($pCount people) +
I want to back out these changes "; +if (defined $form{'generateBackoutCVSCommands'}) { + print "Content-type: text/plain + +# This page can be saved as a shell script and executed. It should be +# run at the top of your CVS work area. It will update your workarea to +# backout the changes selected by your query. + +"; + foreach my $ci (@{$result}) { + my $prev_revision = PrevRev($ci->[$CI_REV]); + print "cvs update -j$ci->[$CI_REV] -j$prev_revision $ci->[$CI_DIR]/$ci->[$CI_FILE]\n"; + } + exit; +} + + EmitHtmlTitleAndHeader($t, "CVS Checkins", "$menu"); #