diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-23 15:28:29 +0000 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-23 15:28:29 +0000 |
commit | 03b878916280732d45c474c106eb3d70b4be5e9e (patch) | |
tree | 496b27b5f6ab3dc8fc8ba5b9ef6e0bea62af6ff8 /becommands | |
parent | 43d8c19ae299bab2cba0f29b560396ba6d8bd1a5 (diff) | |
download | bugseverywhere-03b878916280732d45c474c106eb3d70b4be5e9e.tar.gz |
Added datestamps to bugs
Diffstat (limited to 'becommands')
-rw-r--r-- | becommands/new.py | 7 | ||||
-rw-r--r-- | becommands/show.py | 12 |
2 files changed, 11 insertions, 8 deletions
diff --git a/becommands/new.py b/becommands/new.py index 7c3a952..afa6494 100644 --- a/becommands/new.py +++ b/becommands/new.py @@ -1,13 +1,10 @@ """Create a new bug""" -from libbe import bugdir, cmdutil, names +from libbe import bugdir, cmdutil, names, utility def execute(args): if len(args) != 1: raise cmdutil.UserError("Please supply a summary message") dir = cmdutil.bug_tree() - bug = dir.new_bug() - bug.creator = names.creator() - bug.severity = "minor" - bug.status = "open" + bug = bugdir.new_bug(dir) bug.summary = args[0] bug.save() bugs = (dir.list()) diff --git a/becommands/show.py b/becommands/show.py index 3d1c9ed..3ec5ec4 100644 --- a/becommands/show.py +++ b/becommands/show.py @@ -1,10 +1,16 @@ """Show a particular bug""" -from libbe import bugdir, cmdutil +from libbe import bugdir, cmdutil, utility import os def execute(args): bug_dir = cmdutil.bug_tree() if len(args) !=1: raise cmdutil.UserError("Please specify a bug id.") - print cmdutil.bug_summary(cmdutil.get_bug(args[0], bug_dir), - list(bug_dir.list())) + bug = cmdutil.get_bug(args[0], bug_dir) + print cmdutil.bug_summary(bug, list(bug_dir.list())).rstrip("\n") + if bug.time is None: + time_str = "(Unknown time)" + else: + time_str = "%s (%s)" % (utility.handy_time(bug.time), + utility.time_to_str(bug.time)) + print "Created: %s\n" % time_str |