2843d2cfc55054140b354bc75ad25f1eacbfda30
braney
  Wed Jan 15 23:19:30 2020 -0800
Revert "hgCollection fiddles with the settingsHash of trackDb, which might be"

This reverts commit 3e29ad0059ebf3c9b781ac5317e692ae2a2687bb.

diff --git src/hg/hgCollection/hgCollection.c src/hg/hgCollection/hgCollection.c
index 1ebab5e..15344c8 100644
--- src/hg/hgCollection/hgCollection.c
+++ src/hg/hgCollection/hgCollection.c
@@ -7,31 +7,30 @@
 #include "trackHub.h"
 #include "trashDir.h"
 #include "hubConnect.h"
 #include "hui.h"
 #include "grp.h"
 #include "cheapcgi.h"
 #include "jsHelper.h"
 #include "web.h"
 #include "knetUdc.h"
 #include "api.h"
 #include "genbank.h"
 #include "htmshell.h"
 #include "jsonParse.h"
 #include "customComposite.h"
 #include "stdlib.h"
-#include "localmem.h"
 
 /* Tool tips */
 #define COLLECTION_TITLE  "Double-click to edit name and color"
 #define FOLDER_TITLE      "Click to open node"
 #define TRACK_TITLE       "Press Green Plus to add track to collection"
 
 /* Global Variables */
 struct hash *oldVars = NULL;	/* The cart before new cgi stuff added. */
 // Null terminated list of CGI Variables we don't want to save permanently:
 char *excludeVars[] = {"Submit", "submit", "cmd", "track", "collection", "jsonp", NULL,};
 
 struct track
 {
 struct track *next;
 struct track *trackList;
@@ -718,32 +717,30 @@
     if (collection->trackList == NULL)  // don't output composites without children
         continue;
 
     struct trackDb *tdb = createComposite(collection->name, collection->shortLabel, collection->longLabel, collection->color, priority++);
     struct dyString *dy = trackDbString(tdb);
     fprintf(f, "%s\n",  dy->string);
 
     struct track *track;
     for (track = collection->trackList; track; track = track->next)
         {
         tdb = hashMustFindVal(nameHash, track->name);
         saveTrackName(tdb, hubName, collectionNameHash);
 
         char colorString[64];
         safef(colorString, sizeof colorString, "%ld,%ld,%ld", (track->color >> 16) & 0xff,(track->color >> 8) & 0xff,track->color & 0xff);
-        struct lm *lm = lmInit(4096);
-        tdb->settingsHash = lmCloneHash(lm, tdb->settingsHash);
         hashReplace(tdb->settingsHash, "color", colorString);
 
         hashReplace(tdb->settingsHash, "shortLabel", track->shortLabel);
         hashReplace(tdb->settingsHash, "longLabel", track->longLabel);
         hashReplace(tdb->settingsHash, "track", makeUniqueName(collectionNameHash, track->name));
         hashReplace(tdb->settingsHash, "parent", collection->name);
 
         printTdbToHub(db, conn, f, tdb, 1, priority++);
         }
     }
 fclose(f);
 hFreeConn(&conn);
 }
 
 static unsigned long hexStringToLong(char *str)