diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-05-18 19:41:07 +0000 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-05-18 19:41:07 +0000 |
commit | 35cb1d08a50bed019f86ef3a81140549475b9045 (patch) | |
tree | d7ef43ab6ff9f96fb1595cdbfb5f1a5a0014740b /becommands | |
parent | a39937baf1196099eeee198169d55b9b498e9651 (diff) | |
download | bugseverywhere-35cb1d08a50bed019f86ef3a81140549475b9045.tar.gz |
Added inline help to set-root command
Diffstat (limited to 'becommands')
-rw-r--r-- | becommands/set_root.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/becommands/set_root.py b/becommands/set_root.py index 0ec4c02..c83fd1a 100644 --- a/becommands/set_root.py +++ b/becommands/set_root.py @@ -44,8 +44,9 @@ def execute(args): Traceback (most recent call last): UserError: No such directory: /highly-unlikely-to-exist """ + options, args = get_parser().parse_args(args) if len(args) != 1: - raise cmdutil.UserError("Please supply a directory path") + raise cmdutil.UsageError dir_rcs = rcs.detect(args[0]) if dir_rcs.name is not "None": print "Using %s for revision control." % dir_rcs.name @@ -56,3 +57,21 @@ def execute(args): except bugdir.NoRootEntry: raise cmdutil.UserError("No such directory: %s" % args[0]) print "Directory initialized." + +def get_parser(): + parser = cmdutil.CmdOptionParser("be set-root DIRECTORY") + return parser + +longhelp=""" +This command initializes Bugs Everywhere support for the specified directory +and all its subdirectories. It will auto-detect any supported revision control +system. You can use "be set rcs_name" to change the rcs being used. + +It is usually a good idea to put the Bugs Everywhere root at the source code +root, but you can put it anywhere. If you run "be set-root" in a subdirectory, +then only bugs created in that subdirectory (and its children) will appear +there. +""" + +def help(): + return get_parser().help_str() + longhelp |