Commit ece9d027 authored by Leigh Stoller's avatar Leigh Stoller

Okay, speculative runs are no longer in vogue, long live swapmod

checkboxes.

I have disabled the speculative run code, and restored the original
code.  It was a pretty minor change to bring it back, and we can
around circles as many times as we like.
parent 8f9d663d
......@@ -43,7 +43,7 @@ sub usage()
"<guid/vers> - GUID and version to swapin\n");
exit(-1);
}
my $optlist = "qwx:p:E:a:r:e:dscft:iy:";
my $optlist = "qwx:p:E:a:r:e:dscft:iy:m";
my %options = ();
my $quiet = 0;
my $waitmode = 0;
......@@ -51,6 +51,7 @@ my $debug = 0;
my $foreground = 0;
my $ignoreerrors = 0;
my $clean = 0;
my $doswapmod = 0;
my $paramwhich;
my $paramfile;
my %parameters = ();
......@@ -584,7 +585,7 @@ else {
}
# Mark the start time of the run.
$instance->StartRun(($action eq "modify" ?
$instance->StartRun(($action eq "modify" || $doswapmod ?
Template::STARTRUN_FLAGS_SWAPMOD() : 0)) == 0
or fatal(-1, "Could not mark start of run for $instance!");
......@@ -599,7 +600,7 @@ foreach my $name (keys(%parameters)) {
or fatal(-1, "Could not create run binding for $instance!");
}
if ($action eq "modify") {
if ($action eq "modify" || $doswapmod) {
#
# Now do the swapmod, using the original NS file for now. The environ
# variables will be passed to the NS reparse by parse-ns wrapper script.
......@@ -843,6 +844,9 @@ sub ParseArgs()
if (defined($options{"i"})) {
$ignoreerrors = 1;
}
if (defined($options{"m"})) {
$doswapmod = 1;
}
if (defined($options{"t"})) {
$ctoken = $options{"t"};
......
......@@ -392,9 +392,9 @@ if ($expstate) {
CreateURL("template_exprun", $instance,
"action", "abort"));
}
WRITESUBMENUBUTTON("Modify Resources",
CreateURL("template_exprun", $instance,
"action", "modify"));
#WRITESUBMENUBUTTON("Modify Resources",
# CreateURL("template_exprun", $instance,
# "action", "modify"));
WRITESUBMENUBUTTON("Start New Run",
CreateURL("template_exprun", $instance,
......
......@@ -315,6 +315,23 @@ function SPITFORM($action, $instance, $formfields, $parameters, $errors)
</td>
</tr>\n";
#
# Swapmod?
#
echo "<tr>
<td class='pad4'>Reparse NS file?:</td>
<td class='pad4' class=left>
<input type=checkbox name='formfields[swapmod]' value='Yep'";
if (isset($formfields["swapmod"]) &&
strcmp($formfields["swapmod"], "Yep") == 0) {
echo " checked='1'";
}
echo ">";
echo "&nbsp (effectively a '<tt>swap modify</tt>')
</td>
</tr>\n";
echo "<tr>
<td colspan=2>
Use this text area for an (optional) description:
......@@ -414,6 +431,7 @@ elseif (! isset($formfields)) {
#
$defaults['runid'] = $instance->NextRunID();
$defaults['clean'] = "";
$defaults['swapmod'] = "";
$defaults['description'] = "";
$defaults['parameter_xmlfile'] = "";
......@@ -470,6 +488,13 @@ if (isset($formfields["clean"]) && $formfields["clean"] == "Yep") {
$command_options .= " -c";
}
#
# Swapmod?
#
if (isset($formfields["swapmod"]) && $formfields["swapmod"] == "Yep") {
$command_options .= " -m";
}
#
# Description:
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment