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'),
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: