From 6987178bcff46151f4eb827b8415b10c856b4b73 Mon Sep 17 00:00:00 2001 From: Robert Lehmann Date: Sun, 21 Nov 2010 19:59:53 +0100 Subject: [PATCH] Provide context in comments editor. --- libbe/command/comment.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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( -- 2.26.2