{"thread":{"id":"2284","subject":"[PATCH] Add an option to delete a patch from a certain branch","startedAt":"2005-10-31T20:54:47Z","lastAt":"2005-10-31T20:54:47Z","messageCount":1,"participants":["Paolo 'Blaisorblade' Giarrusso"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"10878","messageId":"20051031205446.2341.98354.stgit@zion.home.lan","threadId":"2284","inReplyTo":null,"subject":"[PATCH] Add an option to delete a patch from a certain branch","fromName":"Paolo 'Blaisorblade' Giarrusso","fromEmail":"blaisorblade@yahoo.it","sentAt":"2005-10-31T20:54:47Z","receivedAt":"2005-10-31T20:54:47Z","isPatch":true,"sender":{"key":"blaisorblade@yahoo.it","avatar":null},"body":"From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>\n\nActually, simply adding the option is enough...\nRestrict print_crt_patch() to the case when we didn't specify --branch (as it's\nuseless otherwise).\n\nSigned-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>\n---\n\n stgit/commands/delete.py |    8 +++++---\n 1 files changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/stgit/commands/delete.py b/stgit/commands/delete.py\n--- a/stgit/commands/delete.py\n+++ b/stgit/commands/delete.py\n@@ -32,8 +32,8 @@ be part of the unapplied list or be the \n case the command also popping it from the stack. Note that the\n 'delete' operation is irreversible.\"\"\"\n \n-options = []\n-\n+options = [make_option('-b', '--branch',\n+                       help = 'use BRANCH instead of the default one')]\n \n def func(parser, options, args):\n     \"\"\"Deletes a patch\n@@ -48,4 +48,6 @@ def func(parser, options, args):\n \n     crt_series.delete_patch(args[0])\n     print 'Patch \"%s\" successfully deleted' % args[0]\n-    print_crt_patch()\n+\n+    if not options.branch:\n+        print_crt_patch()\n"}]}