[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.2-23-ga6ce9af

Sandro Tosi morph at debian.org
Sat May 9 15:49:19 UTC 2009


The following commit has been merged in the master branch:
commit c000125aa8a843ab4c71aac02b8d95068a86dc15
Author: Carl Chenet <carl.chenet at ohmytux.com>
Date:   Tue Apr 14 22:02:38 2009 +0200

    User removes attachments in text mode.

diff --git a/bin/reportbug b/bin/reportbug
index 671bea1..e73ea01 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -187,10 +187,10 @@ def handle_editing(filename, dmessage, options, sendto, attachments, package,
         if not subject:
             ui.long_message('No subject found in message.  Please edit again.\n')
 
-        menuopts = "Ynaceilmpq"
+        menuopts = "Ynaceilmpqd"
 
         if not changed or not subject:
-            menuopts = "ynacEilmpq"
+            menuopts = "ynacEilmpqd"
 
         # cfr Debian BTS #293361
         if package == 'wnpp':
@@ -212,6 +212,7 @@ def handle_editing(filename, dmessage, options, sendto, attachments, package,
                                "save it in a temporary file (exits reportbug).",
                                'q': "Save it in a temporary file and quit.",
                                'a': "Attach a file.",
+                               'd': "Detach a file.",
                                'i': "Include a text file.",
                                'c': "Change editor and re-edit.",
                                'e': 'Re-edit the bug report.',
@@ -240,6 +241,18 @@ def handle_editing(filename, dmessage, options, sendto, attachments, package,
                         ui.display_failure("Can't find %s to include!\n", attachfile)
                 else:
                     break
+        elif x == 'd':
+            skip_editing = True
+            if not attachments:
+                ewrite('No file to detached.\n')
+            else:
+                detachprompt = 'Choose a file to detach:'
+                myattachments = []
+                myattachments = [(x, '') for x in attachments]
+                filetodetach = ui.menu( detachprompt, myattachments, 
+                    'Select the file:', default='', empty_ok=True)
+                attachments.remove(filetodetach)
+                ewrite('File successfully detached.\n')
         elif x == 'c':
             ed = ui.get_filename('Choose editor: ', default=options.editor)
             if ed:

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list