[Box Backup-commit] COMMIT r1460 - box/chris/general/bin/bbackupquery

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Mar 24 19:44:32 GMT 2007


Author: chris
Date: 2007-03-24 19:44:32 +0000 (Sat, 24 Mar 2007)
New Revision: 1460

Modified:
   box/chris/general/bin/bbackupquery/BackupQueries.cpp
   box/chris/general/bin/bbackupquery/BackupQueries.h
Log:
Add a quiet mode to compare command, to make test output easier to read.


Modified: box/chris/general/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/general/bin/bbackupquery/BackupQueries.cpp	2007-03-24 19:43:31 UTC (rev 1459)
+++ box/chris/general/bin/bbackupquery/BackupQueries.cpp	2007-03-24 19:44:32 UTC (rev 1460)
@@ -207,7 +207,7 @@
 		{ "sh",   "" },
 		{ "getobject", "" },
 		{ "get",  "i" },
-		{ "compare", "alcqAE" },
+		{ "compare", "alcqAEQ" },
 		{ "restore", "dri" },
 		{ "help", "" },
 		{ "usage", "" },
@@ -1114,6 +1114,7 @@
 	// Parameters, including count of differences
 	BackupQueries::CompareParams params;
 	params.mQuickCompare = opts['q'];
+	params.mQuietCompare = opts['Q'];
 	params.mIgnoreExcludes = opts['E'];
 	params.mIgnoreAttributes = opts['A'];
 	
@@ -1177,12 +1178,17 @@
 		printf("Incorrect usage.\ncompare -a\n or compare -l <location-name>\n or compare <store-dir-name> <local-dir-name>\n");
 		return;
 	}
-	
-	printf("\n[ %d (of %d) differences probably due to file "
-		"modifications after the last upload ]\n"
-		"Differences: %d (%d dirs excluded, %d files excluded, "
+
+	if (!params.mQuietCompare)
+	{	
+		printf("\n[ %d (of %d) differences probably due to file "
+			"modifications after the last upload ]\n",
+			params.mDifferencesExplainedByModTime, 
+			params.mDifferences);
+	}
+
+	printf("Differences: %d (%d dirs excluded, %d files excluded, "
 		"%d files not checked)\n",
-		params.mDifferencesExplainedByModTime, params.mDifferences, 
 		params.mDifferences, params.mExcludedDirs, 
 		params.mExcludedFiles, params.mUncheckedFiles);
 	

Modified: box/chris/general/bin/bbackupquery/BackupQueries.h
===================================================================
--- box/chris/general/bin/bbackupquery/BackupQueries.h	2007-03-24 19:43:31 UTC (rev 1459)
+++ box/chris/general/bin/bbackupquery/BackupQueries.h	2007-03-24 19:44:32 UTC (rev 1460)
@@ -67,6 +67,7 @@
 		~CompareParams();
 		void DeleteExcludeLists();
 		bool mQuickCompare;
+		bool mQuietCompare;
 		bool mIgnoreExcludes;
 		bool mIgnoreAttributes;
 		int mDifferences;




More information about the Boxbackup-commit mailing list