[Reportbug-maint] Bug#537929: reportbug: Providing a default subject when replying to a bug report
Carl Chenet
chaica at ohmytux.com
Tue Jul 21 19:44:11 UTC 2009
Package: reportbug
Version: 4.5
Severity: wishlist
Tags: patch
Hi,
It would be nice if reportbug could provide a default subject when replying to a bug report, usually we just need Re: whatever-the-subject-is.
Here is a patch to do so.
Bye,
Carl Chenet
-- Package-specific info:
** Environment settings:
DEBEMAIL="chaica at ohmytux.com"
DEBFULLNAME="Carl Chenet"
INTERFACE="text"
** /home/chaica/.reportbugrc:
reportbug_version "4.5"
mode novice
ui text
smtphost "smtp.free.fr"
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages reportbug depends on:
ii apt 0.7.21 Advanced front-end for dpkg
ii python 2.5.4-2 An interactive high-level object-o
ii python-reportbug 4.5 Python modules for interacting wit
reportbug recommends no packages.
Versions of packages reportbug suggests:
pn debconf-utils <none> (no description available)
ii debsums 2.0.44 verification of installed package
pn dlocate <none> (no description available)
ii exim4 4.69-9 metapackage to ease Exim MTA (v4)
ii exim4-daemon-light [mail-tran 4.69-9 lightweight Exim MTA (v4) daemon
ii file 5.00-1 Determines file type using "magic"
ii gnupg 1.4.9-4 GNU privacy guard - a free PGP rep
pn python-gnome2-extras <none> (no description available)
pn python-gtk2 <none> (no description available)
pn python-urwid <none> (no description available)
pn python-vte <none> (no description available)
-- no debconf information
-------------- next part --------------
>From 94b3becf982f81700fb67f6d9361300b33bc3236 Mon Sep 17 00:00:00 2001
From: chaica <chaica at ohmytux.com>
Date: Tue, 21 Jul 2009 21:24:49 +0200
Subject: [PATCH] provide a default subject when replying to a bug report
---
bin/reportbug | 4 +++-
reportbug/ui/text_ui.py | 4 ++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/bin/reportbug b/bin/reportbug
index 6c0e2d9..4bb9dbf 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
@@ -1590,7 +1592,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 e6f7360..e4a274d 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
--
1.6.2.3
More information about the Reportbug-maint
mailing list