Index: trunk/ippTools/src/pztool.c
===================================================================
--- trunk/ippTools/src/pztool.c	(revision 21402)
+++ trunk/ippTools/src/pztool.c	(revision 21479)
@@ -463,4 +463,6 @@
     }
 
+#ifdef notdef
+    // we've changed to use -advance instead
     if (!copydoneCompleteExp(config)) {
         // rollback
@@ -471,5 +473,5 @@
         return false;
     }
-
+#endif
     // point of no return
     if (!psDBCommit(config->dbh)) {
@@ -502,4 +504,5 @@
     PXOPT_LOOKUP_STR(end_stage, config->args, "-end_stage", false, false);
     PXOPT_LOOKUP_STR(label, config->args, "-label", false, false);
+    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
 
     // find all exposures that have had all of their imfiles downloaded but do
@@ -522,4 +525,11 @@
     }
     psFree(where);
+
+    // treat limit == 0 as "no limit"
+    if (limit) {
+        psString limitString = psDBGenerateLimitSQL(limit);
+        psStringAppend(&query, " %s", limitString);
+        psFree(limitString);
+    }
 
     // find completed exps
