src/utils/qa/copyExtSeqRows.csh 1.4

1.4 2009/03/24 19:10:44 rhead
Reverting to -h hgwbeta.
Index: src/utils/qa/copyExtSeqRows.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/copyExtSeqRows.csh,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -B -U 4 -r1.3 -r1.4
--- src/utils/qa/copyExtSeqRows.csh	21 Mar 2009 00:29:25 -0000	1.3
+++ src/utils/qa/copyExtSeqRows.csh	24 Mar 2009 19:10:44 -0000	1.4
@@ -138,9 +138,9 @@
  # if this is a data UPDATE, make file containing lists of what will be
  # dropped from hgwbeta for users review.
  # if the file is empty, then that means this must be NEW data.
  foreach oneFile ( $files )
-  hgsql -h hgofbeta -Ne "SELECT * FROM extFile WHERE path = '$oneFile'" $db \
+  hgsql -h hgwbeta -Ne "SELECT * FROM extFile WHERE path = '$oneFile'" $db \
    >> XXextFileDropFromBetaXX 
  end
 
  # check to make sure that they chose correctly between 'new' and 'update'
@@ -161,9 +161,9 @@
  # get extFile.id of row(s) from extFile on hgwbeta
  set extFileId=`cat XXextFileDropFromBetaXX | awk '{print $1}'`
 
  # it is possible (even common) for there to be no seq table
- set seqTable=`hgsql -h hgofbeta -Ne "SHOW TABLES LIKE 'seq'" $db`
+ set seqTable=`hgsql -h hgwbeta -Ne "SHOW TABLES LIKE 'seq'" $db`
  if ( "" == $seqTable ) then
   set seqTable=0
   echo "0" > XXseqTableXX
  else
@@ -173,9 +173,9 @@
 
  # create file of row(s) from seq on hgwbeta (if there is a seq table)
  if ( 1 == $seqTable ) then
   foreach id ( "$extFileId" )
-   hgsql -h hgofbeta -Ne "SELECT * FROM seq WHERE extFile = '$id'" $db \
+   hgsql -h hgwbeta -Ne "SELECT * FROM seq WHERE extFile = '$id'" $db \
     >> XXseqDropFromBetaXX
   end
  else
   echo "empty" > XXseqDropFromBetaXX
@@ -328,9 +328,9 @@
  else
   set tableList="extFile seq"
  endif
  foreach table ( $tableList )
-  set numTables=`hgsql -h hgofbeta -Ne "SHOW TABLES LIKE '$table'" $db`
+  set numTables=`hgsql -h hgwbeta -Ne "SHOW TABLES LIKE '$table'" $db`
   if ( $numTables == '' ) then
    echo "\n ERROR: the $table table does not exist on hgwbeta."
    echo " You should create an empty $table table in the $db database"
    echo " on hgwbeta and start this script over from the beginning using"
@@ -345,13 +345,13 @@
 
  # Make a backup of seq and extFile tables on hgwbeta.
  foreach table ( $tableList )
   if ( 0 == $DEBUG ) then
-   hgsql -h hgofbeta -e "CREATE TABLE IF NOT EXISTS $table$today \
+   hgsql -h hgwbeta -e "CREATE TABLE IF NOT EXISTS $table$today \
     SELECT * FROM $table" $db
   else
    # DEBUG mode
-   echo "hgsql -h hgofbeta -e "'CREATE TABLE IF NOT EXISTS '$table''$today' \
+   echo "hgsql -h hgwbeta -e "'CREATE TABLE IF NOT EXISTS '$table''$today' \
     SELECT * FROM '$table''" $db\n"
   endif
  end
  
@@ -362,9 +362,9 @@
  # Make sure the extFile table on beta hasn't changed since 'setup' was run.
  # If this is a Case II Update, we expect the table to have changed, so skip it.
  if ( 2 != $case ) then
   foreach oneFile ( $files )
-   hgsql -h hgofbeta -Ne 'SELECT * FROM extFile WHERE path = "'$oneFile'"' \
+   hgsql -h hgwbeta -Ne 'SELECT * FROM extFile WHERE path = "'$oneFile'"' \
     $db >> XXextFileDropFromBetaRealXX
   end
 
   set numDiffs=`diff XXextFileDropFromBetaXX XXextFileDropFromBetaRealXX \
@@ -396,13 +396,13 @@
    # Get the list of id(s) of the rows to drop from the extFile table on beta
    set extFileId=`cat XXextFileDropFromBetaXX | awk '{print $1}'`
    if ( 0 == $DEBUG ) then
     foreach id ( $extFileId )
-     hgsql -h hgofbeta -e "DELETE FROM extFile WHERE id = '$id'" $db
+     hgsql -h hgwbeta -e "DELETE FROM extFile WHERE id = '$id'" $db
     end
    else
     # DEBUG mode
-    echo "hgsql -h hgofbeta -e "'DELETE FROM extFile WHERE id = '$extFileId''" \
+    echo "hgsql -h hgwbeta -e "'DELETE FROM extFile WHERE id = '$extFileId''" \
      $db\n"
    endif
 
    # Drop rows from hgwbeta: $db.seq based on: XXseqDropFromBetaXX
@@ -413,12 +413,12 @@
     # get the unique extFile column numbers from the file:
     set seqExtFile=`cat XXseqDropFromBetaXX | awk '{print $5}' | sort -u`
     foreach val ( $seqExtFile )
      if ( 0 == $DEBUG ) then
-      hgsql -h hgofbeta -e "DELETE FROM seq WHERE extFile = '$val'" $db
+      hgsql -h hgwbeta -e "DELETE FROM seq WHERE extFile = '$val'" $db
      else
       # DEBUG mode
-      echo "hgsql -h hgofbeta -e "'DELETE FROM seq WHERE extFile = '$val''" $db\n"
+      echo "hgsql -h hgwbeta -e "'DELETE FROM seq WHERE extFile = '$val''" $db\n"
      endif
     end #foreach
    endif
   endif
@@ -426,23 +426,23 @@
 
  # do this for all instances: new data, update Case I, update Case II
  # load data into hgwbeta: $db.extFile based on: XXextFileCopyFromDevXX
  if ( 0 == $DEBUG ) then
-  hgsql -h hgofbeta -e 'LOAD DATA LOCAL INFILE "'XXextFileCopyFromDevXX'" \
+  hgsql -h hgwbeta -e 'LOAD DATA LOCAL INFILE "'XXextFileCopyFromDevXX'" \
    INTO TABLE extFile' $db
  else
   # DEBUG mode
-  echo "hgsql -h hgofbeta -e "'LOAD DATA LOCAL INFILE 'XXextFileCopyFromDevXX' \
+  echo "hgsql -h hgwbeta -e "'LOAD DATA LOCAL INFILE 'XXextFileCopyFromDevXX' \
    INTO TABLE extFile'" $db\n"
  endif
 
  # load data into hgwbeta: $db.seq based on: XXseqCopyFromDevXX
  if ( 0 == $DEBUG ) then
-  hgsql -h hgofbeta -e 'LOAD DATA LOCAL INFILE "'XXseqCopyFromDevXX'" \
+  hgsql -h hgwbeta -e 'LOAD DATA LOCAL INFILE "'XXseqCopyFromDevXX'" \
    INTO TABLE seq' $db
  else
   # DEBUG mode
-  echo "hgsql -h hgofbeta -e "'LOAD DATA LOCAL INFILE 'XXseqCopyFromDevXX' \
+  echo "hgsql -h hgwbeta -e "'LOAD DATA LOCAL INFILE 'XXseqCopyFromDevXX' \
    INTO TABLE seq'" $db\n"
  endif
 
  # display final information for user:
@@ -483,15 +483,15 @@
  echo "  extFile and seq tables on hgwbeta. If all is well, do NOT do this!\n"
  echo '#drop rows from $db.extFile:'
  echo '# set extFileId to this: cat XXextFileCopyFromDevXX | awk {print $1}'
  echo '# foreach id in $extFileId'
- echo '#  hgsql -h hgofbeta -e DELETE FROM extFile WHERE id = $id $db'
+ echo '#  hgsql -h hgwbeta -e DELETE FROM extFile WHERE id = $id $db'
  echo '# end'
  echo
  echo '#drop rows from $db.seq:'
  echo '# set seqExtFile to this cat XXseqCopyFromDevXX | awk {print $5} | sort -u'
  echo '# foreach val in $seqExtFile'
- echo '#  hgsql -h hgofbeta -e DELETE FROM seq WHERE extFile = $val $db'
+ echo '#  hgsql -h hgwbeta -e DELETE FROM seq WHERE extFile = $val $db'
  echo '# end\n'
 
  if ( "update" == $type && 1 == "$case" ) then
    echo "4. This script only *copied* rows from the tables on dev to those on beta;"