[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.5-15-gadd5f5b

Sandro Tosi morph at debian.org
Mon Jul 27 13:47:26 UTC 2009


The following commit has been merged in the master branch:
commit 60e6d5c1425bb8bbf1bf7f5882198e8ea61477bd
Author: chaica <chaica at ohmytux.com>
Date:   Tue Jul 21 21:24:49 2009 +0200

    provide a default subject when replying to a bug report

diff --git a/bin/reportbug b/bin/reportbug
index b588d1b..7d71023 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -72,10 +72,12 @@ try:
 except IOError:
     pass
 
+
 # Magic constant time
 MIN_USER_ID = 250
 
 quietly = False
+reporttitle= ''
 
 # Cheat for now.
 # ewrite() may put stuff on the status bar or in message boxes depending on UI
@@ -1600,7 +1602,7 @@ For more details, please see: http://www.debian.org/devel/wnpp/''')
             subject_ok = False
             while not subject_ok:
                 subject = ui.get_string(
-                    'Please provide a subject for your response.', force_prompt=True)
+                    'Please provide a subject for your response.', default="Re: %s" % reporttitle, force_prompt=True)
                 if subject:
                     subject_ok = True
                 else:
diff --git a/reportbug/ui/text_ui.py b/reportbug/ui/text_ui.py
index 967385b..317e534 100644
--- a/reportbug/ui/text_ui.py
+++ b/reportbug/ui/text_ui.py
@@ -404,6 +404,10 @@ def show_report(number, system, mirrors,
         return
 
     (title, messages) = info
+    # save report subject in main
+    m = sys.modules['__main__']
+    m.reporttitle = ' '.join(title.split()[2:])
+
     current_message = 0
     skip_pager = False
 

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list