diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2006-04-06 12:54:06 -0400 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2006-04-06 12:54:06 -0400 |
commit | 1d8631af1d0db514642b9a8f9411559abd73d060 (patch) | |
tree | b7a90513b6d9dc954c7430d18c6a2baa6263758a /becommands/assign.py | |
parent | fe4ccf48aa2a2f4f085e2fa828cffa7795db594f (diff) | |
parent | e762576b97dc1c7ccbb7b0d07b94d9d42ec36b9d (diff) | |
download | bugseverywhere-1d8631af1d0db514642b9a8f9411559abd73d060.tar.gz |
Merge from upstream
Diffstat (limited to 'becommands/assign.py')
-rw-r--r-- | becommands/assign.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/becommands/assign.py b/becommands/assign.py index d682130..d7c2fca 100644 --- a/becommands/assign.py +++ b/becommands/assign.py @@ -26,17 +26,18 @@ def execute(args): >>> os.chdir(dir.dir) >>> dir.get_bug("a").assigned is None True - >>> execute(("a",)) + >>> execute(["a",]) >>> dir.get_bug("a").assigned == names.creator() True - >>> execute(("a", "someone")) + >>> execute(["a", "someone"]) >>> dir.get_bug("a").assigned - 'someone' - >>> execute(("a","none")) + u'someone' + >>> execute(["a","none"]) >>> dir.get_bug("a").assigned is None True >>> tests.clean_up() """ + options, args = get_parser().parse_args(args) assert(len(args) in (0, 1, 2)) if len(args) == 0: print help() @@ -51,10 +52,11 @@ def execute(args): bug.assigned = args[1] bug.save() +def get_parser(): + parser = cmdutil.CmdOptionParser("be assign bug-id [assignee]") + return parser -def help(): - return """be assign bug-id [assignee] - +longhelp = """ Assign a person to fix a bug. By default, the bug is self-assigned. If an assignee is specified, the bug @@ -65,3 +67,6 @@ appears in Creator fields. To un-assign a bug, specify "none" for the assignee. """ + +def help(): + return get_parser().help_str() + longhelp |