Index: trunk/ippTasks/dist.pro
===================================================================
--- trunk/ippTasks/dist.pro	(revision 26961)
+++ trunk/ippTasks/dist.pro	(revision 26962)
@@ -55,5 +55,5 @@
     active true
   end
-  task diff.revert
+  task dist.revert
     active false
   end
@@ -73,8 +73,21 @@
     active false
   end
-  task diff.revert
-    active false
-  end
-end
+  task dist.revert
+    active false
+  end
+end
+
+macro dist.revert.on
+  task dist.revert
+    active true
+  end
+end
+
+macro dist.revert.off
+  task dist.revert
+    active false
+  end
+end
+
 
 macro set.dist.workdir.by.component
@@ -128,4 +141,7 @@
     #echo outdir is $$varname
 end
+
+$dist_revert_DB = 0
+
 
 task	       dist.process.load
@@ -400,2 +416,48 @@
   end
 end
+
+task chip.revert
+  host         local
+
+  periods      -poll 5.0
+  periods      -exec 60.0
+  periods      -timeout 120.0
+  npending     1
+
+  stdout NULL
+  stderr $LOGDIR/revert.log
+
+  task.exec
+    if ($LABEL:n == 0) break
+    $run = disttool -revertcomponent
+    if ($DB:n == 0)
+      option DEFAULT
+    else
+      # save the DB name for the exit tasks
+      option $DB:$dist_revert_DB
+      $run = $run -dbname $DB:$dist_revert_DB
+      $chip_revert_DB ++
+      if ($dist_revert_DB >= $DB:n) set dist_revert_DB = 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
