Index: trunk/ippTasks/addstar.pro
===================================================================
--- trunk/ippTasks/addstar.pro	(revision 37482)
+++ trunk/ippTasks/addstar.pro	(revision 37551)
@@ -52,4 +52,10 @@
     active false
   end
+  task addstar.revert.diff
+    active false
+  end
+  task addstar.revert.fullforce
+    active false
+  end
 end
 
@@ -65,4 +71,10 @@
   end
   task addstar.revert.skycal
+    active true
+  end
+  task addstar.revert.diff
+    active true
+  end
+  task addstar.revert.fullforce
     active true
   end
@@ -141,4 +153,6 @@
 $addstar_revert_DB_SSM = 0
 $addstar_revert_DB_SC = 0 
+$addstar_revert_DB_FF = 0 
+$addstar_revert_DB_DF = 0 
 
 #$LOADEXEC_ADD = 300
@@ -275,4 +289,10 @@
         sprintf outroot "%s.add.%s" $STAGEROOT $ADD_ID
     end
+    if ("$STAGE" == "diff")
+        sprintf outroot "%s.add.%s" $STAGEROOT $ADD_ID
+    end
+    if ("$STAGE" == "fullforce")
+        sprintf outroot "%s.add.%s" $STAGEROOT $ADD_ID
+    end
 
   
@@ -293,4 +313,10 @@
    if ("$STAGE" == "skycal")
       $run = $run --stage_id $STAGE_ID
+    end
+   if ("$STAGE" == "diff")
+      $run = $run --stage_id $STAGE_ID --stage_extra1 $STAGE_EXTRA1
+    end
+   if ("$STAGE" == "fullforce")
+      $run = $run --stage_id $STAGE_ID --stage_extra1 $STAGE_EXTRA1
     end
 
@@ -526,2 +552,98 @@
   end
 end
+
+
+task addstar.revert.diff
+  host         local
+
+  periods      -poll 5.0
+  periods      -exec 60.0
+  periods      -timeout 1200
+  npending     1
+  active        false
+
+  stdout NULL
+  stderr $LOGDIR/revert.log
+
+  task.exec
+    if ($LABEL:n == 0) break
+    $run = addtool -revertprocessedexp -stage diff
+    if ($DB:n == 0)
+      option DEFAULT
+    else
+      # save the DB name for the exit tasks                                                                   
+      option $DB:$addstar_revert_DB_DF
+      $run = $run -dbname $DB:$addstar_revert_DB_DF
+      $addstar_revert_DB_DF ++
+      if ($addstar_revert_DB_DF >= $DB:n) set addstar_revert_DB_DF = 0
+    end
+     add_poll_labels run
+    command $run
+  end
+
+  # success                                                                                                   
+  task.exit    0
+  end
+
+  # locked list                                                                                               
+  task.exit    default
+    showcommand failure
+  end
+
+  task.exit    crash
+    showcommand crash
+  end
+
+  # operation times out?                                                                                      
+  task.exit    timeout
+    showcommand timeout
+  end
+end
+
+
+task addstar.revert.fullforce
+  host         local
+
+  periods      -poll 5.0
+  periods      -exec 60.0
+  periods      -timeout 1200
+  npending     1
+  active        false
+
+  stdout NULL
+  stderr $LOGDIR/revert.log
+
+  task.exec
+    if ($LABEL:n == 0) break
+    $run = addtool -revertprocessedexp -stage fullforce
+    if ($DB:n == 0)
+      option DEFAULT
+    else
+      # save the DB name for the exit tasks                                                                   
+      option $DB:$addstar_revert_DB_FF
+      $run = $run -dbname $DB:$addstar_revert_DB_FF
+      $addstar_revert_DB_FF ++
+      if ($addstar_revert_DB_FF >= $DB:n) set addstar_revert_DB_FF = 0
+    end
+     add_poll_labels run
+    command $run
+  end
+
+  # success                                                                                                   
+  task.exit    0
+  end
+
+  # locked list                                                                                               
+  task.exit    default
+    showcommand failure
+  end
+
+  task.exit    crash
+    showcommand crash
+  end
+
+  # operation times out?                                                                                      
+  task.exit    timeout
+    showcommand timeout
+  end
+end
