diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-14 20:13:30 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-14 20:13:30 -0500 |
commit | 0f87a22c20a019f49455005542d4c60216ce39d2 (patch) | |
tree | cc049719dfeb4ba385c2e34b71a2ee8c03a92c69 /libbe/comment.py | |
parent | 3e5823d0985a54dec37f103dc72fda604d12a948 (diff) | |
download | bugseverywhere-0f87a22c20a019f49455005542d4c60216ce39d2.tar.gz |
Transitioned merge to Command-format
Diffstat (limited to 'libbe/comment.py')
-rw-r--r-- | libbe/comment.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libbe/comment.py b/libbe/comment.py index 1582632..3b8a9c7 100644 --- a/libbe/comment.py +++ b/libbe/comment.py @@ -155,6 +155,8 @@ class Comment(Tree, settings_object.SavedSettingsObject): decode=self.content_type.startswith("text/")) def _set_comment_body(self, old=None, new=None, force=False): assert self.uuid != INVALID_UUID, self + if self.bug != None and self.bug.bugdir != None: + new = libbe.util.id.short_to_long_user([self.bug.bugdir], new) if (self.storage != None and self.storage.writeable == True) \ or force==True: assert new != None, "Can't save empty comment" @@ -460,7 +462,10 @@ class Comment(Tree, settings_object.SavedSettingsObject): lines.append("Date: %s" % self.date) lines.append("") if self.content_type.startswith("text/"): - lines.extend((self.body or "").splitlines()) + body = (self.body or "") + if self.bug != None and self.bug.bugdir != None: + body = libbe.util.id.long_to_short_user([self.bug.bugdir], body) + lines.extend(body.splitlines()) else: lines.append("Content type %s not printable. Try XML output instead" % self.content_type) |