8cc61900672e957331a5ae02cea5b7cc53f8e5f9 braney Mon Oct 31 14:32:12 2016 -0700 check to see if tracks have duplicated names . diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c index fe7a5cd..8e36d62 100644 --- src/hg/lib/trackHub.c +++ src/hg/lib/trackHub.c @@ -785,31 +785,35 @@ } requiredSetting(hub, genome, tdb, "bigDataUrl"); } } static void markContainers( struct trackHub *hub, struct trackHubGenome *genome, struct trackDb *tdbList) /* Mark containers that are parents, or have them. */ { struct hash *hash = hashNew(0); struct trackDb *tdb; // add all the track names to a hash for (tdb = tdbList; tdb != NULL; tdb = tdb->next) + { + if (hashLookup(hash, tdb->track)) + errAbort("Track %s appears more than once in genome %s.", tdb->track, genome->name); hashAdd(hash, tdb->track, tdb); + } // go through and find the container tracks for (tdb = tdbList; tdb != NULL; tdb = tdb->next) { char *parentLine = trackDbLocalSetting(tdb, "parent"); // maybe it's a child of a supertrack? if (parentLine == NULL) { parentLine = trackDbLocalSetting(tdb, "superTrack"); if ((parentLine != NULL) && startsWith("on", parentLine)) parentLine = NULL; } if (parentLine != NULL)