diff options
author | Robert Lehmann <mail@robertlehmann.de> | 2010-11-21 19:59:53 +0100 |
---|---|---|
committer | Robert Lehmann <mail@robertlehmann.de> | 2010-11-21 19:59:53 +0100 |
commit | 6987178bcff46151f4eb827b8415b10c856b4b73 (patch) | |
tree | 12005d0abf1d6b7301aa1e7f17759e91615b487f /libbe/command | |
parent | a210eb6d8a3418a36aa0da75cf355b937ef1a992 (diff) | |
download | bugseverywhere-6987178bcff46151f4eb827b8415b10c856b4b73.tar.gz |
Provide context in comments editor.
Diffstat (limited to 'libbe/command')
-rw-r--r-- | libbe/command/comment.py | 8 |
1 files 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( |