From 64e2db8908fd582af6046665db628ec0600f3f5f Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" Date: Thu, 1 Oct 1998 15:05:46 +0000 Subject: [PATCH] Added a link which will generate a script of CVS commands which would back out the changes listed on the page. git-svn-id: svn://10.0.0.236/trunk@11665 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bonsai/cvsquery.cgi | 32 ++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) 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"); #