[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 6.0-9-g5a7a511
Sandro Tosi
morph at debian.org
Tue Aug 16 16:11:14 UTC 2011
The following commit has been merged in the master branch:
commit 77ddd710f099ab0aeb1d5956871ba0fb6c3e3fff
Author: Sandro Tosi <morph at debian.org>
Date: Tue Aug 16 17:23:20 2011 +0200
at the last menu, saving the report to a file (instead of sending it) now saves all the emails headers and attachment, not only the report body; thanks to Ian Zimmerman for the report; Closes: #626656
diff --git a/bin/reportbug b/bin/reportbug
index 50aad28..6d4f459 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -163,6 +163,8 @@ def handle_editing(filename, dmessage, options, sendto, attachments, package,
message = None
patch = False
skip_editing = False
+ # is this report just to be saved on a file ?
+ justsave = False
while True:
if not skip_editing:
(message, changed) = ui.spawn_editor(message or dmessage, filename,
@@ -320,8 +322,8 @@ def handle_editing(filename, dmessage, options, sendto, attachments, package,
break
skip_editing = True
elif x in ('n', 'q'):
- stopmsg(filename)
- sys.exit(1)
+ justsave = True
+ break
elif x in ('l', 'p'):
skip_editing = True
if x == 'l':
@@ -377,7 +379,7 @@ def handle_editing(filename, dmessage, options, sendto, attachments, package,
else:
break
- return open(filename).read(), patch
+ return open(filename).read(), patch, justsave
def find_package_for(filename, notatty=False, pathonly=False):
ewrite("Finding package for '%s'...\n", filename)
@@ -2074,9 +2076,9 @@ For more details, please see: http://www.debian.org/devel/wnpp/''')
fh.close()
oldmua = mua or self.options.mua
if not self.options.body and not self.options.bodyfile:
- message, haspatch = handle_editing(filename, message, self.options,
- sendto, attachments, package,
- severity, mode, charset=charset, tags=tags)
+ message, haspatch, justsave = handle_editing(
+ filename, message, self.options, sendto, attachments,
+ package, severity, mode, charset=charset, tags=tags)
if haspatch:
patch = True
@@ -2130,13 +2132,27 @@ For more details, please see: http://www.debian.org/devel/wnpp/''')
# newline in the message. See #234963.
body = body.rstrip('\n')+'\n'
- submit.send_report(
- body, attachments, mua, fromaddr, sendto, ccaddr, bccaddr,
- headers, package, charset, mailing, sysinfo, rtype, exinfo,
- self.options.replyto, self.options.printonly, self.options.template,
- self.options.outfile, self.options.mta, self.options.kudos, self.options.smtptls,
- smtphost, self.options.smtpuser, self.options.smtppasswd, self.options.paranoid,
- self.options.draftpath)
+ if justsave:
+ fh, outputfile = TempFile(prefix=tfprefix,
+ dir=self.options.draftpath)
+ fh.close()
+ mua = mailing = False
+ # fake sending the report, it actually saves it in a tempfile
+ # but with all the email headers and stuff
+ submit.send_report(
+ body, attachments, mua, fromaddr, sendto, ccaddr, bccaddr,
+ headers, package, charset, mailing, sysinfo, rtype, exinfo,
+ outfile=self.options.outfile or outputfile, mta=None,
+ smtphost=None)
+ else:
+ submit.send_report(
+ body, attachments, mua, fromaddr, sendto, ccaddr, bccaddr,
+ headers, package, charset, mailing, sysinfo, rtype, exinfo,
+ self.options.replyto, self.options.printonly,
+ self.options.template, self.options.outfile, self.options.mta,
+ self.options.kudos, self.options.smtptls, smtphost,
+ self.options.smtpuser, self.options.smtppasswd,
+ self.options.paranoid, self.options.draftpath)
if self.options.exitprompt:
ui.get_string('Please press ENTER to exit reportbug: ')
diff --git a/debian/changelog b/debian/changelog
index 217d428..83768de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,8 +12,12 @@ reportbug (6.1) UNRELEASED; urgency=low
Niels Thykier for the report; Closes: #628769
* Use debian-swirl.svg (copied from gnome-icon-theme to avoid the dep) in the
desktop file; thanks to Sérgio Cipolla for the report; Closes: #632383
+ * bin/reportbug
+ - at the last menu, saving the report to a file (instead of sending it) now
+ saves all the emails headers and attachment, not only the report body;
+ thanks to Ian Zimmerman for the report; Closes: #626656
- -- Sandro Tosi <morph at debian.org> Tue, 16 Aug 2011 02:49:10 +0200
+ -- Sandro Tosi <morph at debian.org> Tue, 16 Aug 2011 17:21:57 +0200
reportbug (6.0) unstable; urgency=low
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list