IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28829


Ignore:
Timestamp:
Aug 2, 2010, 1:23:37 PM (16 years ago)
Author:
rhenders
Message:

Added methid to get current revert status for a given stage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czartool/Pantasks.pm

    r28825 r28829  
    135135}
    136136
     137###########################################################################
     138#
     139# Gets revert status for this stage
     140#
     141###########################################################################
     142sub getRevertStatus {
     143    my ($self, $stage, $reverting) = @_;
    137144
     145    my $server = $self->getServerForThisStage($stage);
     146
     147    if ($stage eq "cam") {$stage = "camera";}
     148
     149    my @cmdOut = `echo "status;quit" | pantasks_client -c ~ipp/$server/ptolemy.rc 2>&1`;
     150    my $line;
     151    foreach $line (@cmdOut) {
     152
     153        chomp($line);
     154        if ($line =~ m/\s+([+-])[+-]\s+$stage\.revert.*/) {
     155
     156            if ($1 =~ m/-/) {${$reverting} = 0;}
     157            elsif ($1 =~ m/\+/) {${$reverting}=1;}
     158        }
     159    }
     160}
     161
Note: See TracChangeset for help on using the changeset viewer.