IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26956


Ignore:
Timestamp:
Feb 15, 2010, 3:49:50 PM (16 years ago)
Author:
eugene
Message:

update pubtool -definerun to accept multiple labels

Location:
trunk/ippTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/pubtool_definerun.sql

    r25929 r26956  
    22SELECT
    33    client_id,
    4     stage_id
     4    stage_id,
     5    src_label
    56FROM (
    67    -- Get diffs to publish
    78    SELECT
    89        client_id,
    9         diff_id AS stage_id
     10        diff_id AS stage_id,
     11        label AS src_label
    1012    FROM publishClient
    1113    JOIN diffRun
     
    1820    SELECT
    1921        client_id,
    20         cam_id AS stage_id
     22        cam_id AS stage_id,
     23        label AS src_label
    2124    FROM publishClient
    2225    JOIN camRun
  • trunk/ippTools/src/pubtool.c

    r25932 r26956  
    156156    // optional
    157157    PXOPT_COPY_S64(config->args, where, "-client_id", "client_id", "==");
    158     PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
    159 
    160     PXOPT_LOOKUP_STR(label, config->args, "-label", false, false);
     158    pxAddLabelSearchArgs (config, where, "-label", "label", "=="); // define using newExp label
    161159
    162160    psString query = pxDataGet("pubtool_definerun.sql"); // Query to run
     
    211209        psS64 client = psMetadataLookupS64(NULL, row, "client_id"); // Client identifier
    212210        psS64 stage = psMetadataLookupS64(NULL, row, "stage_id");   // Stage identifier
     211        char *label = psMetadataLookupStr(NULL, row, "src_label");   // label from correct source
    213212
    214213        if (!publishRunInsert(config->dbh, 0, client, stage, label, "new")) {
  • trunk/ippTools/src/pubtoolConfig.c

    r25929 r26956  
    6262    psMetadata *definerunArgs = psMetadataAlloc();
    6363    psMetadataAddS64(definerunArgs, PS_LIST_TAIL, "-client_id", 0, "search by client_id", 0);
    64     psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", 0, "set and search by label", NULL);
     64    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "set and search by label", NULL);
    6565
    6666    // -pending
Note: See TracChangeset for help on using the changeset viewer.