From: Robert Lehmann Date: Sun, 21 Nov 2010 18:59:53 +0000 (+0100) Subject: Provide context in comments editor. X-Git-Tag: 1.1.0~245^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6987178bcff46151f4eb827b8415b10c856b4b73;p=be.git Provide context in comments editor. --- diff --git a/libbe/command/comment.py b/libbe/command/comment.py index aea0930..20a66c3 100644 --- a/libbe/command/comment.py +++ b/libbe/command/comment.py @@ -124,11 +124,13 @@ class Comment (libbe.command.Command): # try to launch an editor for comment-body entry try: if parent == bug.comment_root: - parent_body = bug.summary+'\n' + header = "Subject: %s" % bug.summary + parent_body = parent.string_thread() or "No comments" else: + header = "From: %s\nTo: %s" % (parent.author, bug) parent_body = parent.body - estr = 'Please enter your comment above\n\n> %s\n' \ - % ('\n> '.join(parent_body.splitlines())) + estr = 'Please enter your comment above\n\n%s\n\n> %s\n' \ + % (header, '\n> '.join(parent_body.splitlines())) body = libbe.ui.util.editor.editor_string(estr) except libbe.ui.util.editor.CantFindEditor, e: raise libbe.command.UserError(