404563416231e2b5a57eeee4fe09b0d9d2b77e60
max
  Wed Apr 2 05:50:41 2014 -0700
changing hgLiftOver strategy in the browserbox: downloading liftoverfiles to local disk instead of streaming them through http, refs #11957
and refs #12717

diff --git src/hg/inc/hdb.h src/hg/inc/hdb.h
index bc55619..29343e4 100644
--- src/hg/inc/hdb.h
+++ src/hg/inc/hdb.h
@@ -190,38 +190,47 @@
  * on this database. */
 
 boolean hgPcrOk(char *database);
 /* Return TRUE if ok to put up hgPcr on this database. */
 
 boolean hTableExists(char *db, char *table);
 /* Return TRUE if a table exists in database. */
 
 boolean hTableOrSplitExists(char *db, char *table);
 /* Return TRUE if table (or a chrN_table) exists in database. */
 
 char *hTableForTrack(char *db, char *trackName);
 /* Return a table for a track in db. Returns one of the split
  * tables, or main table if not split */
 
+char *hReplaceGbdbLocal(char* fileName);
+ /* Returns a gbdb filename, potentially rewriting it according to hg.conf's gbdbLoc1 */
+ /* Result has to be freed */
+
 char *hReplaceGbdb(char* fileName);
 /* clone and change a filename that can be located in /gbdb to somewhere else
  * according to hg.conf's "gbdbLoc1" and "gbdbLoc2". Result has to be freed. */
 
 char *hReplaceGbdbSeqDir(char *path, char *db);
 /* similar to hReplaceGbdb, but accepts a nib or 2bit "directory" (basename) under
  * gbdb, like /gbdb/hg19 (for jkLib that means /gbdb/hg19/hg19.2bit). */
 
+
+char* hReplaceGbdbMustDownload(char* path);
+/* given a location in /gbdb, rewrite it to the new location using gbdbLoc1 and download it
+ * if needed from gbdbLoc2. */
+
 void hParseTableName(char *db, char *table, char trackName[HDB_MAX_TABLE_STRING],
 		     char chrom[HDB_MAX_CHROM_STRING]);
 /* Parse an actual table name like "chr17_random_blastzWhatever" into
  * the track name (blastzWhatever) and chrom (chr17_random). */
 
 int hChromSize(char *db, char *chromName);
 /* Return size of chromosome. */
 
 struct chromInfo *hGetChromInfo(char *db, char *chrom);
 /* Get chromInfo for named chromosome (case-insens.) from db.
  * Return NULL if no such chrom. */
 
 struct dnaSeq *hFetchSeq(char *fileName, char *seqName, int start, int end);
 /* Fetch sequence from file.  If it is a .2bit file then fetch the named sequence.
 If it is .nib then just ignore seqName. */