6452a01362d66b305bfda62b217901d0da0c587f braney Fri Nov 1 11:00:59 2024 -0700 add cart rewrite for decipher tracks moving into supertrack diff --git src/hg/cgilib/cartRewrite.c src/hg/cgilib/cartRewrite.c index 2de670d..3ab4960 100644 --- src/hg/cgilib/cartRewrite.c +++ src/hg/cgilib/cartRewrite.c @@ -3,45 +3,47 @@ * with trackDb. */ /* Copyright (C) 2021 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "cart.h" #include "hgConfig.h" void cartEdit0(struct cart *cart); void cartEdit1(struct cart *cart); void cartEdit2(struct cart *cart); void cartEdit3(struct cart *cart); void cartEdit4(struct cart *cart); void cartEdit5(struct cart *cart); +void cartEdit6(struct cart *cart); struct cartRewrite { void (*func)(struct cart *cart); }; // Here's the list of cart rewrite functions static struct cartRewrite cartRewrites[] = { { cartEdit0}, { cartEdit1}, { cartEdit2}, { cartEdit3}, { cartEdit4}, { cartEdit5}, +{ cartEdit6}, }; void cartRewrite(struct cart *cart, unsigned trackDbCartVersion, unsigned cartVersion) /* Rewrite the cart to update it to expectations of trackDb. */ { if (sameString(cfgOptionDefault("cartVersion", "on"), "off")) return; // call the rewrite functions to bring us up to the trackDb cart version for(; cartVersion < trackDbCartVersion; cartVersion++) { // if we don't have a rewrite for this increment, bail out // with a warning in the error_log if (cartVersion >= ArraySize(cartRewrites)) {