IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 16, 2010, 3:42:45 PM (16 years ago)
Author:
Paul Price
Message:

Allow pubtool -definerun to set a label, overriding input labels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/pubtool.c

    r28323 r28371  
    173173    PXOPT_COPY_STR(config->args, camWhere, "-obs_mode", "rawExp.obs_mode", "LIKE");
    174174
     175    PXOPT_LOOKUP_STR(set_label, config->args, "-set_label", false, false);
    175176    PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false);
    176177    PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false);
     
    261262        psS64 client = psMetadataLookupS64(NULL, row, "client_id"); // Client identifier
    262263        psS64 stage = psMetadataLookupS64(NULL, row, "stage_id");   // Stage identifier
    263         char *label = psMetadataLookupStr(NULL, row, "src_label");   // label from correct source
    264 
    265         if (!publishRunInsert(config->dbh, 0, client, stage, label, "new")) {
     264        const char *label = psMetadataLookupStr(NULL, row, "src_label");   // label from correct source
     265
     266        if (!publishRunInsert(config->dbh, 0, client, stage, set_label ? set_label : label, "new")) {
    266267            psError(PS_ERR_UNKNOWN, false, "Unable to add fileset");
    267268            psFree(output);
Note: See TracChangeset for help on using the changeset viewer.