44e3dc026187c8f73c1f93316dd9ee5cbd829c8c
braney
  Fri Mar 9 13:48:01 2018 -0800
add times to collection names to make them more unique

diff --git src/hg/hgCollection/hgCollection.c src/hg/hgCollection/hgCollection.c
index 8464d50..afd925e 100644
--- src/hg/hgCollection/hgCollection.c
+++ src/hg/hgCollection/hgCollection.c
@@ -51,36 +51,39 @@
 struct grp *grp;
 double priority;
 int order;
 };
 
 static char *makeUnique(struct hash *nameHash, char *name)
 // Make the name of this track unique.
 {
 char *skipHub = trackHubSkipHubName(name);
 if (hashLookup(nameHash, skipHub) == NULL)
     {
     hashStore(nameHash, name);
     return skipHub;
     }
 
+char base[4096];
+safef(base, sizeof base, "%s_%lx",skipHub, time(NULL) - 1520629086);
+
 unsigned count = 0;
 char buffer[4096];
 
 for(;; count++)
     {
-    safef(buffer, sizeof buffer, "%s%d", skipHub, count);
+    safef(buffer, sizeof buffer, "%s%d", base, count);
     if (hashLookup(nameHash, buffer) == NULL)
         {
         hashStore(nameHash, buffer);
         return cloneString(buffer);
         }
     }
 
 return NULL;
 }
 
 static boolean trackCanBeAdded(struct trackDb *tdb)
 // are we allowing this track into a custom composite
 {
 return  (tdb->subtracks == NULL) && !startsWith("wigMaf",tdb->type) &&  (startsWith("wig",tdb->type) || startsWith("bigWig",tdb->type) || startsWith("bedGraph",tdb->type)) ;
 }