chiark / gitweb /
Merge branch 'proposed' of git://github.com/gustavh/stgit
[stgit] / stgit / commands / redo.py
index 23478f6a22df2de0903a0037907681677b9d9291..eb8b20fb23cb7ffc59c7bb3f0c6c4d01253211e0 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."""
 
 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'),
 options = [
     opt('-n', '--number', type = 'int', metavar = 'N', default = 1,
         short = 'Undo the last N undos'),
@@ -46,7 +47,8 @@ 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,
         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)
     except transaction.TransactionHalted:
     try:
         log.reset_stack(trans, stack.repository.default_iw, state)
     except transaction.TransactionHalted: