aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/comment.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2006-04-06 12:54:06 -0400
committerAaron Bentley <abentley@panoramicfeedback.com>2006-04-06 12:54:06 -0400
commit1d8631af1d0db514642b9a8f9411559abd73d060 (patch)
treeb7a90513b6d9dc954c7430d18c6a2baa6263758a /becommands/comment.py
parentfe4ccf48aa2a2f4f085e2fa828cffa7795db594f (diff)
parente762576b97dc1c7ccbb7b0d07b94d9d42ec36b9d (diff)
downloadbugseverywhere-1d8631af1d0db514642b9a8f9411559abd73d060.tar.gz
Merge from upstream
Diffstat (limited to 'becommands/comment.py')
-rw-r--r--becommands/comment.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/becommands/comment.py b/becommands/comment.py
index c53fd87..4f0bf3b 100644
--- a/becommands/comment.py
+++ b/becommands/comment.py
@@ -26,7 +26,7 @@ def execute(args):
>>> execute(["a", "This is a comment about a"])
>>> comment = dir.get_bug("a").list_comments()[0]
>>> comment.body
- 'This is a comment about a\\n'
+ u'This is a comment about a\\n'
>>> comment.From == names.creator()
True
>>> comment.date <= int(time.time())
@@ -40,13 +40,13 @@ def execute(args):
>>> os.environ["EDITOR"] = "echo 'I like cheese' > "
>>> execute(["b"])
>>> dir.get_bug("b").list_comments()[0].body
- 'I like cheese\\n'
+ u'I like cheese\\n'
>>> tests.clean_up()
"""
options, args = get_parser().parse_args(args)
if len(args) < 1:
raise cmdutil.UsageError()
- bug = cmdutil.get_bug(args[0])
+ bug, parent_comment = cmdutil.get_bug_and_comment(args[0])
if len(args) == 1:
try:
body = utility.editor_string()
@@ -61,15 +61,21 @@ def execute(args):
body+='\n'
comment = bugdir.new_comment(bug, body)
+ if parent_comment is not None:
+ comment.in_reply_to = parent_comment.uuid
comment.save()
def get_parser():
- parser = cmdutil.CmdOptionParser("be comment BUG-ID COMMENT")
+ parser = cmdutil.CmdOptionParser("be comment ID COMMENT")
return parser
longhelp="""
-Add a comment to a bug.
+To add a comment to a bug, use the bug ID as the argument. To reply to another
+comment, specify the comment name (as shown in "be show" output).
+
+$EDITOR is used to launch an editor. If unspecified, no comment will be
+created.)
"""
def help():