From bd8d5fdc0d37970824daac68f8d7c76975e9d36d Mon Sep 17 00:00:00 2001 From: Thomas Habets Date: Wed, 7 Jan 2009 19:39:32 +0100 Subject: XML output for "be show" --- becommands/show.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'becommands') diff --git a/becommands/show.py b/becommands/show.py index abec813..1ee354c 100644 --- a/becommands/show.py +++ b/becommands/show.py @@ -41,10 +41,15 @@ def execute(args): bd = bugdir.BugDir(from_disk=True) for bugid in args: bug = bd.bug_from_shortname(bugid) - print bug.string(show_comments=True) + if options.dumpXML: + print bug.xml(show_comments=True) + else: + print bug.string(show_comments=True) def get_parser(): - parser = cmdutil.CmdOptionParser("be show BUG-ID [BUG-ID ...]") + parser = cmdutil.CmdOptionParser("be show [options] BUG-ID [BUG-ID ...]") + parser.add_option("-x", "--xml", action="store_true", + dest='dumpXML', help="Dump as XML") return parser longhelp=""" -- cgit