c9b40ed334908a1b791191a3df227ae991b4810e braney Fri Mar 22 18:07:12 2013 -0700 fold back in the changes Angie made in the commit before my last commit. Change cartCopyCustomTracks() to not take a database argument since it's interation over all the "ctfile_*" in the cart anyway.All of this is to fix the problem that now loading a cart and connecting to hubs is what should be an atomic act. As it was, there were some hdb routines called after a new cart was loaded, but before the referenced hubs were loaded. As it is now, hgSession will load new carts without reloading the associated hubs. This would only be a problem with assembly hubs, and I don't think it matters since hgSession isn't displaying hub data anyway. diff --git src/hg/inc/cart.h src/hg/inc/cart.h index a65abbf..014719a 100644 --- src/hg/inc/cart.h +++ src/hg/inc/cart.h @@ -424,39 +424,38 @@ #define hgSessionPrefix "hgS_" #define hgsOtherUserName hgSessionPrefix "otherUserName" #define hgsOtherUserSessionName hgSessionPrefix "otherUserSessionName" #define hgsDoOtherUser hgSessionPrefix "doOtherUser" #define hgsLoadUrlName hgSessionPrefix "loadUrlName" #define hgsDoLoadUrl hgSessionPrefix "doLoadUrl" #define namedSessionTable "namedSessionDb" void sessionTouchLastUse(struct sqlConnection *conn, char *encUserName, char *encSessionName); /* Increment namedSessionDb.useCount and update lastUse for this session. */ -boolean cartLoadUserSession(struct sqlConnection *conn, char *sessionOwner, +void cartLoadUserSession(struct sqlConnection *conn, char *sessionOwner, char *sessionName, struct cart *cart, struct hash *oldVars, char *actionVar); /* If permitted, load the contents of the given user's session, and then * reload the CGI settings (to support override of session settings). * If non-NULL, oldVars will contain values overloaded when reloading CGI. * If non-NULL, actionVar is a cartRemove wildcard string specifying the * CGI action variable that sent us here. */ -/* Return TRUE if a session was loaded. */ void cartLoadSettings(struct lineFile *lf, struct cart *cart, struct hash *oldVars, char *actionVar); /* Load settings (cartDump output) into current session, and then * reload the CGI settings (to support override of session settings). * If non-NULL, oldVars will contain values overloaded when reloading CGI. * If non-NULL, actionVar is a cartRemove wildcard string specifying the * CGI action variable that sent us here. */ char *cartGetOrderFromFile(char *genomeDb, struct cart *cart, char *speciesUseFile); /* Look in a cart variable that holds the filename that has a list of * species to show in a maf file */ char *cartGetOrderFromFileAndMsaTable(char *genomeDb, struct cart *cart, char *speciesUseFile, char *msaTable); /* Look in a cart variable that holds the filename that has a list of @@ -540,25 +539,25 @@ boolean ignoreRemoved,boolean ignoreCreated); /* Returns TRUE if new cart setting has changed from old cart setting */ int cartRemoveFromTdbTree(struct cart *cart,struct trackDb *tdb,char *suffix,boolean skipParent); /* Removes a 'trackName.suffix' from all tdb descendents (but not parent). If suffix NULL then removes 'trackName' which holds visibility */ boolean cartTdbTreeReshapeIfNeeded(struct cart *cart,struct trackDb *tdbComposite); /* When subtrack vis is set via findTracks, and composite has no cart settings, then fashion composite to match found */ boolean cartTdbTreeCleanupOverrides(struct trackDb *tdb,struct cart *newCart,struct hash *oldVars, struct lm *lm); /* When composite/view settings changes, remove subtrack specific settings Returns TRUE if any cart vars are removed */ -void cartCopyCustomTracks(struct cart *cart, char *db); +void cartCopyCustomTracks(struct cart *cart); /* If cart contains any live custom tracks, save off a new copy of them, * to prevent clashes by multiple uses of the same session. */ void cgiExitTime(char *cgiName, long enteredMainTime); /* single stderr print out called at end of CGI binaries to record run * time in apache error_log */ #endif /* CART_H */