aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorGianluca Montecchi <gian@grys.it>2009-10-21 01:18:40 +0200
committerGianluca Montecchi <gian@grys.it>2009-10-21 01:18:40 +0200
commit85ab0b48299435a5ecfa6f93af95948d432e096a (patch)
tree6346eb2fe91dea868c6cf934130eafababbb2f60 /libbe
parente6dd43d2542aa3f67ebba61dd77942fb0a48a1f2 (diff)
downloadbugseverywhere-85ab0b48299435a5ecfa6f93af95948d432e096a.tar.gz
Finished merge with Trevor branch
Diffstat (limited to 'libbe')
-rw-r--r--libbe/comment.py4
-rw-r--r--libbe/vcs.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/libbe/comment.py b/libbe/comment.py
index 41bc7e6..02bcc93 100644
--- a/libbe/comment.py
+++ b/libbe/comment.py
@@ -604,7 +604,7 @@ class Comment(Tree, settings_object.SavedSettingsObject):
reply.in_reply_to = self.uuid
self.append(reply)
- def new_reply(self, body=None):
+ def new_reply(self, body=None, content_type=None):
"""
>>> comm = Comment(bug=None, body="Some insightful remarks")
>>> repA = comm.new_reply("Critique original comment")
@@ -613,6 +613,8 @@ 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 self.bug != None:
reply.set_sync_with_disk(self.bug.sync_with_disk)
if reply.sync_with_disk == True:
diff --git a/libbe/vcs.py b/libbe/vcs.py
index 7b506e8..7484660 100644
--- a/libbe/vcs.py
+++ b/libbe/vcs.py
@@ -840,7 +840,6 @@ class VCS_commit_TestCase(VCSTestCase):
def test_revision_file_contents_as_committed(self):
"""Should get file contents as committed to specified revision."""
- import sys
if not self.vcs.versioned:
return
for path in self.test_files: