aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-14 17:09:32 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-14 17:09:32 -0400
commitf98f688c326e8254a02b261ae9b21c1b95539c3a (patch)
treef694f451f4e78e53904e05ef541ab49b4d1050b6
parentf88f3e349393ecfde389a4d3916c433302627d33 (diff)
downloadbugseverywhere-f98f688c326e8254a02b261ae9b21c1b95539c3a.tar.gz
Added --author and --alt-id to "be comment".
You could already add this info via the --xml input, now you can do it from the command line too.
-rw-r--r--becommands/comment.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/becommands/comment.py b/becommands/comment.py
index 66f8da1..6db7895 100644
--- a/becommands/comment.py
+++ b/becommands/comment.py
@@ -113,6 +113,10 @@ def execute(args, test=False):
if options.XML == False:
new = parent.new_reply(body=body)
+ if options.author != None:
+ new.From = options.author
+ if options.alt_id != None:
+ new.alt_id = options.alt_id
if options.content_type != None:
new.content_type = options.content_type
else: # import XML comment [list]
@@ -157,6 +161,10 @@ def execute(args, test=False):
def get_parser():
parser = cmdutil.CmdOptionParser("be comment ID [COMMENT]")
+ parser.add_option("-a", "--author", metavar="AUTHOR", dest="author",
+ help="Set the comment author", default=None)
+ parser.add_option("--alt-id", metavar="ID", dest="alt_id",
+ help="Set an alternate comment ID", default=None)
parser.add_option("-c", "--content-type", metavar="MIME", dest="content_type",
help="Set comment content-type (e.g. text/plain)", default=None)
parser.add_option("-x", "--xml", action="store_true", default=False,