diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-14 07:37:51 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-14 07:37:51 -0500 |
commit | 19fe0817ba7c2cd04caea3adfa82d4490288a548 (patch) | |
tree | 6291cac9b9861f1009d63a419c3e79879f356bc8 /libbe/comment.py | |
parent | 2f0ceedba5b6619faf476cd1aa67e826e91d5c7c (diff) | |
download | bugseverywhere-19fe0817ba7c2cd04caea3adfa82d4490288a548.tar.gz |
Transitioned comment to Command format
Diffstat (limited to 'libbe/comment.py')
-rw-r--r-- | libbe/comment.py | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/libbe/comment.py b/libbe/comment.py index 7b318cb..1582632 100644 --- a/libbe/comment.py +++ b/libbe/comment.py @@ -73,7 +73,9 @@ def load_comments(bug, load_full=False): from disk *now*, rather than waiting and lazy loading as required. """ uuids = [] - for id in libbe.util.id.child_uuids(bug.storage.children()): + for id in libbe.util.id.child_uuids( + bug.storage.children( + bug.id.storage())): uuids.append(id) comments = [] for uuid in uuids: @@ -118,14 +120,8 @@ class Comment(Tree, settings_object.SavedSettingsObject): doc="Alternate ID for linking imported comments. Internally comments are linked (via In-reply-to) to the parent's UUID. However, these UUIDs are generated internally, so Alt-id is provided as a user-controlled linking target.") def alt_id(): return {} - def _get_user_id(self): - if self.bug != None: - return self.bug._get_user_id() - return None - @_versioned_property(name="Author", - doc="The author of the comment", - generator=_get_user_id) + doc="The author of the comment") def author(): return {} @_versioned_property(name="In-reply-to", @@ -613,7 +609,7 @@ class Comment(Tree, settings_object.SavedSettingsObject): reply.in_reply_to = self.uuid self.append(reply) - def new_reply(self, body=None, content_type=None): + def new_reply(self, body=None): """ >>> comm = Comment(bug=None, body="Some insightful remarks") >>> repA = comm.new_reply("Critique original comment") @@ -622,10 +618,6 @@ class Comment(Tree, settings_object.SavedSettingsObject): True """ reply = Comment(self.bug, body=body) - if content_type != None: # set before saving body to decide binary format - reply.content_type = content_type - if reply.storage != None and reply.storage.is_writeable(): - reply.save() self.add_reply(reply) return reply |