From: W. Trevor King Date: Mon, 27 Jul 2009 13:06:27 +0000 (-0400) Subject: Tweaked the output text for modified bugs in libbe.diff and be-handle-mail. X-Git-Tag: 1.0.0~62^2~46^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=df1c1cb1b2a33452ee4fa197c5145f07302a741a;p=be.git Tweaked the output text for modified bugs in libbe.diff and be-handle-mail. --- diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index 90f5c28..55f04b0 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -285,8 +285,12 @@ class DiffTree (libbe.diff.DiffTree): class Diff (libbe.diff.Diff): def bug_add_string(self, bug): return bug.string(show_comments=True) - def comment_summary_string(self, comment): + def _comment_summary_string(self, comment): return comment.string() + def comment_add_string(self, comment): + return self._comment_summary_string(comment) + def comment_rem_string(self, comment): + return self._comment_summary_string(comment) class Message (object): def __init__(self, email_text=None, disable_parsing=False): diff --git a/libbe/diff.py b/libbe/diff.py index 4164e94..0956624 100644 --- a/libbe/diff.py +++ b/libbe/diff.py @@ -398,7 +398,9 @@ class Diff (object): first_line = comment.body.splitlines()[0] return "%s\n %s..." % (summary, first_line) def comment_rem_string(self, comment): - return self._comment_summary_string(comment) + summary = self._comment_summary_string(comment) + first_line = comment.body.splitlines()[0] + return "%s\n %s..." % (summary, first_line) def comment_mod_string(self, comments): old_comment,new_comment = comments return self._comment_summary_string(new_comment)