Index: /other-projects/nightly-tasks/diffcol/trunk/gen-model-colls.sh
===================================================================
--- /other-projects/nightly-tasks/diffcol/trunk/gen-model-colls.sh	(revision 28048)
+++ /other-projects/nightly-tasks/diffcol/trunk/gen-model-colls.sh	(revision 28049)
@@ -20,14 +20,15 @@
 # rebuilt collection, overwriting their equivalents in the svn model collection,
 # but not removing any extraneous HASH folders already present.
-
-# Pass in --svndelete to remove what's in archives and index from svn and replace
-# the contents of archives and index with the matching contents from the rebuild 
-# collection. Useful for when the HASH directory naming has changed and everything
+# !!!!! IMPORTANT: if you pass in svnupdate, it leaves you to do the final commit on 
+# the (svn) model-collect folder!
+
+# Pass in --svndelete to remove the archives and index from svn in the model-collect
+# and replace this with the rebuilt archives and index 
+# The --svndelete is useful for when the HASH directory naming has changed and everything
 # in archives and index has to be wiped out and moved back in from the rebuilt col.
-
-# If neither is passed in, then the collections are rebuilt but the svn model-collect
+# Passing in --svndelete will do the final commits on the model-collect folder.
+
+# If neither flag is passed in, then the collections are rebuilt but the svn model-collect
 # is not updated and the repository is not updated.
-
-# This program leaves you to do the final commit on the (svn) model-collect folder!
 
 # Examples of usage:
@@ -37,12 +38,13 @@
 
 # The first just rebuilds all the collections in a new folder called collect and stops there
-# The second rebuilds all the collections and then removes all contents of the archives and the
-# index folders from the svn checked-out model-collect and removes them from svn. Then it copies 
-# across all the contents of the rebuilt archives and index into model-collect and svn adds them.
-# The third example checks out all the model-collections again, but rebuilds only the 3 collections 
-# specified in the new collect folder. Then it copies across the contents of the archives and index
-# folders of those 3 collections into their model-collect equivalents.
-
-# You then still have to do the final svn commit on the model-collect folder.
+
+# The second rebuilds all the collections in collect and svn removes the archives and the index 
+# folders in model-collect. Then it copies across the rebuilt archives and index into model-collect 
+# and svn adds them.
+
+# The third example checks out all the model-collections again, but rebuilds only the 2 collections 
+# specified in the new collect folder. Then it copies across the *contents* of the archives and 
+# index folders of those 2 collections into their model-collect equivalents. You then still have to 
+# do the final svn commit on the model-collect folder after looking over the differences.
 
 # Also valid examples:
@@ -56,9 +58,10 @@
 # Makes a copy
 # In the copy: gets rid of their .svn folders, and builds each collection in turn, moving building to index once done
-# If --svndelete was passed in: svn removes model-collect/archives/* and model-collect/index/*, copies over index/* 
-# and archives/* from collect into model-collect and svn adds model-collect/archives/* and model-collect/index/*
+# If --svndelete was passed in: svn removes model-collect/archives and model-collect/index, copies over collect/index
+# and collect/archives into model-collect and svn adds model-collect/archives and model-collect/index. Then SVN COMMITS
+# model-collect/archives and model-collect/index.
 # If --svnupdate was passed in: copies collect/archives/* into model-collect/archives/*, and copies collect/index/*
 # into model-collect/index/*, overwriting files that already existed but have now been updated upon rebuild. However, 
-# --svnupdate will leave untouched any files and folders unique to model-collect.
+# --svnupdate will leave untouched any files and folders unique to model-collect. No SVN commit, that's LEFT UP TO YOU.
 
 # See earlier version of this script:
@@ -90,5 +93,5 @@
 
 
-# Function that handles the --svndelete flag (mode) of this script
+# Function that handles the --svndelete flag (mode) of this script for a single collection
 function svn_delete () {
 
@@ -112,5 +115,5 @@
     # commit all the svn rm statements done above in one go:
     # don't do `svn up` here, as this will then retrieve all the folders that were svn-removed
-    svn commit -m "Clean rebuild of model collections 1/2. Clearing out deprecated archives and index." model-collect
+    svn commit -m "AUTOCOMMIT by gen-model-colls.sh script. Clean rebuild of model collections 1/2. Clearing out deprecated archives and index." model-collect
 
     # do an svn up to locally delete what was svn-removed above, BEFORE copying from the rebuilt archives and index folders
@@ -128,5 +131,11 @@
 
     # commit all the svn add statements done just above in one go
-    svn commit -m "Clean rebuild of model collections 2/2. Adding rebuilt archives and index." model-collect
+    svn commit -m "AUTOCOMMIT by gen-model-colls.sh script. Clean rebuild of model collections 2/2. Adding rebuilt archives and index." model-collect
+
+    echo
+    echo "*********************"
+    echo "Done svn-deleting rebuilt model-collection: $collection"
+    echo "*********************"
+    echo
 }
 
@@ -181,5 +190,6 @@
 
 
-# svn update/delete a single collection
+# UNUSED, but useful for spotting differences between the collect and model-collect
+# after rebuild, before svn updating/deleting, as opposed to at the end of the script
 function svn_process_single_collection () {
     collection=$1
@@ -235,5 +245,5 @@
 }
 
-# Function that takes care of the --svnupdate flag mode of this script
+# Function that takes care of the --svnupdate flag mode of this script for a single collection
 function update_single_collection () {
 
@@ -245,4 +255,10 @@
 
     # if etc/collect.cfg is different, copy it across too?
+
+    echo
+    echo "*********************"
+    echo "Done updating the rebuilt LOCAL model-collection: model-collect/$collection"
+    echo "*********************"
+    echo
 }
 
@@ -261,5 +277,5 @@
     echo
     echo "*********************"
-    echo "Done processing $collection"
+    echo "Done rebuilding model collection: $collection"
     echo "*********************"
     echo
@@ -388,4 +404,7 @@
 # (or if collections are specified in the cmdline arguments, copy just these over from model-collect into collect)
 # Then remove the copy's .svn folders
+echo "***********************************************"
+echo "Creating a copy of the model-collect folder as folder collect and removing the .svn subfolders from the copy:"
+echo
 if [ -e collect_orig ]; then
     if [ ! -e collect ]; then
@@ -408,4 +427,5 @@
     fi
 fi
+echo "***********************************************"
 
 # Set up the Greenstone environment for building
@@ -424,5 +444,5 @@
 
 	if [ "x$mode" != "x" ]; then
-	    svn_process_single_collection $collection
+	    #svn_process_single_collection $collection
 
 	    if [ "x$mode" == "xsvnupdate" ]; then
@@ -447,7 +467,7 @@
 
 	    if [ "x$mode" != "x" ]; then
-		svn_process_single_collection $collection
-
-		if [ "x$mode" != "x" ]; then
+		#svn_process_single_collection $collection
+
+		if [ "x$mode" == "xsvnupdate" ]; then
 		    update_single_collection $collection
 		fi
@@ -468,18 +488,36 @@
 echo
 echo "*****************************************"
+echo
+# NO LONGER NECESSARY: WE'RE DOING A DIFF BETWEEN collect AND model-collect AT THIS SCRIPT'S END
 # if we were svn updating/deleting collections, then mode was set
 # if in that case a report was generated with additional differences, point the user to it
-if [ -f report.txt ] && [ "x$mode" != "x" ]; then
-    echo "Some files outside of archives and index folders were different. See report.txt"
-    echo
-fi
-
-echo "The original collect directory has been left renamed as collect_orig"
+#if [ -f report.txt ] && [ "x$mode" != "x" ]; then
+#    echo "Some files or folders outside of archives and index directories were different. See report.txt"
+#    echo
+#fi
+
+# if not svnupdating or svndeleting, then inform the user that model-collect is unchanged
+# if svnupdating, then warn the user that model-collect still needs committing
+# if svndeleting, then inform the user that model-collect has been changed and committed
+if [ "x$mode" == "x" ]; then
+    echo "* The model-collect folder has not been altered. Changes have only been made to collect"
+elif [ "x$mode" == "xsvnupdate" ]; then
+    echo "* TO DO: You still need to run svn status and then svn commit on the model-collect folder. Besides that:"    
+elif [ "x$mode" == "xsvndelete" ]; then
+    echo "* The model-collect folder's archives and index subfolders have been updated and committed to svn."
+fi
 echo
-if [ "x$mode" == "x" ]; then
-    echo "The model-collect folder has not been altered. Changes have only been made to collect"
-else
-    echo "You still need to run svn status and svn commit on the model-collect folder"
-fi
+
+if [ "x$mode" != "x" ]; then
+    echo "* DIFFERENCES REMAINING BETWEEN model-collect AND collect (skipping .svn folders):"
+    echo
+    echo "---START DIFF---"
+    diff -rq model-collect collect | grep -v ".svn"
+    echo "---END DIFF---"
+    echo
+fi
+
+echo "* The original collect directory has been left renamed as collect_orig"
+echo
 echo "*****************************************"
 echo
@@ -496,4 +534,5 @@
 # The following when put in a separate script file will delete all folders from model-collect that are
 # empty in the copied collection (all folders which contain only a .svn subfolder in model-collect)
+# ---------------------------------------------
 #!/bin/bash
 
@@ -531,2 +570,3 @@
 
 #done
+# ---------------------------------------------
