130c65d9512af860b1a14c406620f3ac71296ddf
braney
  Sun May 26 12:52:25 2013 -0700
added TRIX search for track hubs.  UDC'ified trix library.  Refs #10426
diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index da66b98..f8cc8f5 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -4015,51 +4015,60 @@
 {
 struct trackDb *tdb;
 
 tdb = hMaybeTrackInfo(conn, trackName);
 if (tdb == NULL)
     errAbort("Track %s not found", trackName);
 return tdb;
 }
 #ifdef UNUSED
 #endif /* UNUSED */
 
 
 boolean hTrackCanPack(char *db, char *trackName)
 /* Return TRUE if this track can be packed. */
 {
+if (isHubTrack(trackName))
+    return TRUE; // all the big* files can pack
 struct sqlConnection *conn = hAllocConn(db);
 struct trackDb *tdb = hMaybeTrackInfo(conn, trackName);
 boolean ret = FALSE;
 if (tdb != NULL)
     {
     ret = tdb->canPack;
     trackDbFree(&tdb);
     }
 hFreeConn(&conn);
 return ret;
 }
 
 char *hTrackOpenVis(char *db, char *trackName)
 /* Return "pack" if track is packable, otherwise "full". */
 {
 return hTrackCanPack(db, trackName) ? "pack" : "full";
 }
 
 char *hGetParent(char *db, char *subtrackName)
 /* Given a subtrack table, find its parent */
 {
+// TODO--- hub tracks can have parents.  This is only called from
+// item search, but it should work there too.   We should be able
+// to grab these out of the settings hash, but then why doesn't
+// this happen for mySQL tracks?  It would be a lot faster methinks
+if (isHubTrack(subtrackName))
+    return NULL;
+
 struct sqlConnection *conn = hAllocConn(db);
 struct trackDb *tdb = hMaybeTrackInfo(conn, subtrackName);
 char *ret = NULL;
 if (tdb != NULL)
     {
     ret = firstWordInLine( trackDbLocalSetting(tdb, "parent"));
     trackDbFree(&tdb);
     }
 hFreeConn(&conn);
 return ret;
 }
 
 static struct hash *makeTrackSettingsHash(char *db)
 /* Create  a hash of hashes with all track settings for database.
  * The returned hash is keyed by track.   The contained hashes