418ddc85df90579c88010c122604ced2163c60bf
braney
  Tue Feb 1 13:05:55 2022 -0800
make cart rewrites on by default.  Can still be turned off in hg.conf with
"cartVersion=off" Refs #28831

diff --git src/hg/cgilib/cartRewrite.c src/hg/cgilib/cartRewrite.c
index 93d90e5..014a9f9 100644
--- src/hg/cgilib/cartRewrite.c
+++ src/hg/cgilib/cartRewrite.c
@@ -15,31 +15,31 @@
 struct cartRewrite
 {
 void (*func)(struct cart *cart);
 };
 
 // Here's the list of cart rewrite functions
 static struct cartRewrite cartRewrites[] =
 {
 { cartEdit0},
 { cartEdit1},
 };
 
 void cartRewrite(struct cart *cart, unsigned trackDbCartVersion, unsigned cartVersion)
 /* Rewrite the cart to update it to expectations of trackDb. */
 {
-if (sameString(cfgOptionDefault("cartVersion", "off"), "off"))
+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))
         {
         fprintf(stderr,"CartRewriteError: do not have cart rewrite rules to bring it up to version %d requested by trackDb. Reached level %d\n", trackDbCartVersion, cartVersion);
         break;
         }
     (cartRewrites[cartVersion].func)(cart);
     }