Slightly modify the "publish" command description
[stgit] / stgit / commands / redo.py
index 8952680..eb8b20f 100644 (file)
@@ -32,6 +32,7 @@ the effects of consecutive invocations of "stg undo".
 It is an error to run "stg redo" if the last command was not an
 undo."""
 
+args = []
 options = [
     opt('-n', '--number', type = 'int', metavar = 'N', default = 1,
         short = 'Undo the last N undos'),
@@ -46,9 +47,10 @@ def func(parser, options, args):
         raise common.CmdException('Bad number of undos to redo')
     state = log.undo_state(stack, -options.number)
     trans = transaction.StackTransaction(stack, 'redo %d' % options.number,
-                                         discard_changes = options.hard)
+                                         discard_changes = options.hard,
+                                         allow_bad_head = True)
     try:
-        log.reset_stack(trans, stack.repository.default_iw, state, [])
+        log.reset_stack(trans, stack.repository.default_iw, state)
     except transaction.TransactionHalted:
         pass
-    return trans.run(stack.repository.default_iw)
+    return trans.run(stack.repository.default_iw, allow_bad_head = True)