089f03e66c25e320a57768fa522bfc4accdbb9d1 tdreszer Fri Mar 18 17:12:05 2011 -0700 hwdev does rsync now. diff --git src/hg/lib/fileUi.c src/hg/lib/fileUi.c index e46c8fe..ec3a1b0 100644 --- src/hg/lib/fileUi.c +++ src/hg/lib/fileUi.c @@ -48,49 +48,55 @@ || savedSubDir == NULL || differentString(savedSubDir,subDir)) { // free up any static mem freeMem(savedDb); freeMem(savedDir); freeMem(savedSubDir); fileDbFree(&foundFiles); FILE *scriptOutput = NULL; char buf[1024]; char cmd[512]; char *words[10]; char *server = hDownloadsServer(); boolean useRsync = TRUE; +//#define RSYNC_DONT_WORK_ON_HGWDEV +#ifdef RSYNC_DONT_WORK_ON_HGWDEV if (hIsPrivateHost() || hIsPreviewHost()) { // For hgwdev (which is the same machine as "hgdownload-test.cse.ucsc.edu") rsync does not work // Use ls -log --time=ctime --time-style=long-iso /usr/local/apache/htdocs-hgdownload/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone safef(cmd,sizeof(cmd),"ls -log --time-style=long-iso /usr/local/apache/htdocs-hgdownload/goldenPath/%s/%s/%s/", db,dir,subDir); useRsync = FALSE; } else if (hIsBetaHost()) { // For hgwbeta, the files are being looked for one test in a "beta/" subdir. Have to rsync //server = "hgdownload-test.cse.ucsc.edu"; // NOTE: Force this case because beta may think it's downloads server is "hgdownload.cse.ucsc.edu" //safef(cmd,sizeof(cmd),"rsync -avn rsync://%s/goldenPath/%s/%s/%s/beta/", server, db, dir, subDir); // FIXME: Need cluster-admins help to get rsync solution safef(cmd,sizeof(cmd),"ls -log --time-style=long-iso /hive/groups/encode/dcc/pipeline/downloads/%s/%s/beta/", db,subDir); useRsync = FALSE; } else // genome and hgwbeta can use rsync +#endif///def RSYNC_DONT_WORK_ON_HGWDEV { // Works: rsync -avn rsync://hgdownload.cse.ucsc.edu/goldenPath/hg18/encodeDCC/wgEncodeBroadChipSeq/ + if (hIsBetaHost()) + safef(cmd,sizeof(cmd),"rsync -avn rsync://hgdownload-test.cse.ucsc.edu/goldenPath/%s/%s/%s/beta/", db, dir, subDir); // NOTE: Force this case because beta may think it's downloads server is "hgdownload.cse.ucsc.edu" + else safef(cmd,sizeof(cmd),"rsync -avn rsync://%s/goldenPath/%s/%s/%s/", server, db, dir, subDir); } //warn("cmd: %s",cmd); scriptOutput = popen(cmd, "r"); while(fgets(buf, sizeof(buf), scriptOutput)) { eraseTrailingSpaces(buf); if (!endsWith(buf,".md5sum")) // Just ignore these { int count = chopLine(buf, words); if (count >= 6 && useRsync == FALSE) // hgwdev is same as hgdownloads-test so can't use rsync { //-rw-rw-r-- 5 502826550 2010-10-22 16:51 /usr/local/apache/htdocs-hgdownload/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneGm12878ControlStdRawDataRep1.fastq.gz AllocVar(oneFile); oneFile->fileSize = sqlUnsignedLong(words[2]);