# intended-blessing <intended-blessing>
# branch-set <new-branch>
# job-status <job-spec>
+# jobs-rename <job-spec> <perl-expr>
#
# <foo-spec>:
# <foo-name>
});
}
+sub change__jobs_rename {
+ die unless @changes >= 2;
+ my $jobs = shift @changes;
+ my $perlop = shift @changes;
+
+ my $jobq = $dbh_tests->prepare(<<END);
+ UPDATE jobs
+ SET job = ?
+ WHERE flight = ? AND job = ?
+END
+ my $runvarq = $dbh_tests->prepare(<<END);
+ UPDATE runvars
+ SET job = ?
+ WHERE flight = ? AND job = ?
+END
+ for_jobs($dstflight, $jobs, sub {
+ my ($oldjob) = @_;
+ my $newjob = perlop_value ($oldjob, '', $perlop, $oldjob);
+ print "$oldjob renamed to $newjob\n";
+ $jobq->execute($newjob, $dstflight, $oldjob);
+ $runvarq->execute($newjob, $dstflight, $oldjob);
+ })
+}
sub changes () {
debug("CHANGES...\n");