Merge help updates
authorAaron Bentley <abentley@panoramicfeedback.com>
Mon, 3 Apr 2006 18:39:52 +0000 (14:39 -0400)
committerAaron Bentley <abentley@panoramicfeedback.com>
Mon, 3 Apr 2006 18:39:52 +0000 (14:39 -0400)
1  2 
becommands/show.py

index db3bb90e7bb1b86740d15c54e2baa4e0636b9ccc,314cf46eb16124b52df35b2bf3289368b2422752..8e83a1f9a50fa96f5c149899dbdc5c9899dffb30
@@@ -30,11 -31,20 +31,22 @@@ def execute(args)
          time_str = "%s (%s)" % (utility.handy_time(bug.time), 
                                  utility.time_to_str(bug.time))
      print "Created: %s" % time_str
 -    for comment in bug.list_comments():
 -        print "--------- Comment ---------"
 -        print "From: %s" % comment.From
 -        print "Date: %s\n" % utility.time_to_str(comment.date)
 -        print comment.body.rstrip('\n')
 +    unique_name = cmdutil.unique_name(bug, bug_dir.list())
 +    comments = []
 +    name_map = {}
 +    for c_name, comment in cmdutil.iter_comment_name(bug, unique_name):
 +        name_map[comment.uuid] = c_name
 +        comments.append(comment)
 +    threaded = bugdir.thread_comments(comments)
 +    cmdutil.print_threaded_comments(threaded, name_map)
+ def get_parser():
+     parser = cmdutil.CmdOptionParser("be show bug-id")
+     return parser
+ longhelp="""
+ Show all information about a bug.
+ """
+ def help():
+     return get_parser().help_str() + longhelp
 -