Index: src/hg/lib/trackDbCustom.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/trackDbCustom.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -b -B -U 4 -r1.75 -r1.76
--- src/hg/lib/trackDbCustom.c	27 Jan 2010 07:41:21 -0000	1.75
+++ src/hg/lib/trackDbCustom.c	4 Feb 2010 22:58:17 -0000	1.76
@@ -718,9 +718,9 @@
                      || atoi(setting) != 0));
 }
 
 struct trackDb *subTdbFind(struct trackDb *parent,char *table)
-/* Return subTrack tdb if it exists in parent. */
+/* Return child tdb if it exists in parent. */
 {
 if(parent == NULL)
     return NULL;
 
@@ -901,9 +901,9 @@
 /* Do subtrack hierarchy - filling in parent and subtracks fields. */
 for (tdb = superlessList; tdb != NULL; tdb = next)
     {
     next = tdb->next;
-    char *subtrackSetting = trackDbLocalSetting(tdb, "subTrack");
+    char *subtrackSetting = trackDbLocalSetting(tdb, "parent");
     if (subtrackSetting != NULL)
         {
 	char *parentName = cloneFirstWord(subtrackSetting);
 	struct trackDb *parent = hashFindVal(trackHash, parentName);
@@ -913,9 +913,9 @@
 	    tdb->parent = parent;
 	    }
 	else
 	    {
-	    errAbort("Parent track %s of subTrack %s doesn't exist", parentName, tdb->tableName);
+	    errAbort("Parent track %s of child %s doesn't exist", parentName, tdb->tableName);
 	    }
 	freez(&parentName);
 	}
     else
@@ -1038,4 +1038,41 @@
 else
     return tdb;
 }
 
+boolean trackDbUpdateOldTag(char **pTag, char **pVal)
+/* Look for obscolete tags and update them to new format.  Return TRUE if any update
+ * is done.  Will allocate fresh memory for new tag and val if updated. */
+{
+char *tag = *pTag;
+char *val = *pVal;
+boolean updated = FALSE;
+
+if (sameString(tag, "compositeTrack"))
+    {
+    tag = "container";
+    val = "composite";
+    }
+else if (sameString(tag, "subTrack"))
+    {
+    tag = "parent";
+    }
+else if (sameString(tag, "superTrack"))
+    {
+    if (sameWord(val, "on"))
+        {
+	tag = "container";
+	val = "folder";
+	}
+    else
+        {
+	tag = "parent";
+	}
+    }
+if (updated)
+    {
+    *pTag = cloneString(tag);
+    *pVal = cloneString(val);
+    }
+return updated;
+}
+

