- # If --undo is passed, do the work and exit
- if options.undo:
- patch = crt_series.get_current()
- if not patch:
- raise CmdException, 'No patch to undo'
-
- out.start('Undoing push of "%s"' % patch)
- resolved_all()
- if crt_series.undo_push():
- out.done()
- else:
- out.done('patch unchanged')
- print_crt_patch(crt_series)
-
- return
-