Convert "stg edit" to the new infrastructure
authorKarl Hasselström <kha@treskal.com>
Fri, 1 Feb 2008 03:37:56 +0000 (04:37 +0100)
committerKarl Hasselström <kha@treskal.com>
Sun, 10 Feb 2008 14:46:38 +0000 (15:46 +0100)
commit4491d19b003ff492dcb614d88b32858743a9cc44
treeab9597021f10f63771f0a8a6762fd3c22f1d4a67
parenta6a5abd815445a2e2fe08fa046d190d50455cce6
Convert "stg edit" to the new infrastructure

The --annotate and --undo switches were dropped in the conversion.
--annotate could be re-added, but --undo is more problematic since the
command will now rewrite any applied patches on top of the edited
patch. It seems best to leave this job to the fabled general undo
command, expected Real Soon Now.

In addition to the usual improvements from the new infrastructure,
this patch has some additional benefits:

  * There's a new -e/--edit flag, which forces interactive editing
    even if options such as --sign or --author are given. (Normally,
    interactive editing is skipped if the patch is modified with a
    commandline option.)

  * It's now possible to edit any patch, including unapplied patches.
    Even diff editing works for all patches, including unapplied
    patches. (In fact, editing unapplied patches is slightly safer,
    since they don't mind a dirty index/worktree.)

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/commands/edit.py