e30e926564e223f37e02a3d0ba6b9f04b8d15fce
browser
  Thu Nov 6 09:15:13 2014 +0000
fixing bug where hgLiftOver would not map regions on the gbib. Also adding a progress message so the user has some idea what's going on.
diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index 760b86e..3927cbd 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -1342,49 +1342,53 @@
 char buf[4096];
 safef(buf, sizeof(buf), "%s/%s.2bit", path, db);
 char *newPath = hReplaceGbdb(buf);
 
 char dir[4096];
 splitPath(newPath, dir, NULL, NULL);
 freeMem(newPath);
 return cloneString(dir);
 }
 
 char* hReplaceGbdbMustDownload(char* path)
 /* given a location in /gbdb, rewrite it to the new location using gbdbLoc1 and download it
  * if needed from gbdbLoc2.
  * Used for adding files on the fly on mirrors or the box.
  * Returns local path, needs to be freed. Aborts if download failed.
+ * Prints a "please wait..." message to stdout if file has to be downloaded.
  * */
 {
 char* locPath = hReplaceGbdbLocal(path);
 // skip if file is there
 if (fileExists(locPath))
     return locPath;
 // skip if we already got a url or cannot rewrite a path
 char* url = hReplaceGbdb(path);
 if (sameString(locPath, url))
     return locPath;
 
 // check that we can write to the dest dir
 if ((access(locPath, W_OK))==0)
     errAbort("trying to download %s but no write access to %s\n", url, locPath);
 
 char locDir[1024];
 splitPath(locPath, locDir, NULL, NULL);
 makeDirsOnPath(locDir);
 
+printf("<p>please wait... downloading %s...</p>\n\n", url);
+fflush(stdout);
+
 bool success = parallelFetch(url, locPath, 1, 1, TRUE, FALSE);
 if (! success)
     errAbort("Could not download %s to %s\n", url, locPath);
 
 return locPath;
 }
 
 char *hTryExtFileNameC(struct sqlConnection *conn, char *extFileTable, unsigned extFileId, boolean abortOnError)
 /* Get external file name from table and ID.  Typically
  * extFile table will be 'extFile' or 'gbExtFile'
  * If abortOnError is true, abort if the id is not in the table or if the file
  * fails size check, otherwise return NULL if either of those checks fail.   
  * Please freeMem the result when you are done with it. 
  * (requires conn passed in) 
  */