set the default for reporoot for the command line

Use the default reporoot of '.' for all commands that take the value as
an argument, and make the argument optional.

Change-Id: I02ce81df91a9252273dad7cb84a1f330187bc3e7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann committed 2016-07-22 18:45:44 -04:00
1 parent c022901e2e
commit c745d30c8b
2 files changed
+11

No files matched your search

@@ -0,0 +1,5 @@
---
features:
- Set the default value of the reporoot argument
for all command line programs to "." and make
it an optional parameter.
+6
View File
@@ -97,6 +97,8 @@ def main(argv=sys.argv[1:]):
_build_query_arg_group(do_list)
do_list.add_argument(
'reporoot',
default='.',
nargs='?',
help='root of the git repository',
)
do_list.set_defaults(func=lister.list_cmd)
@@ -107,6 +109,8 @@ def main(argv=sys.argv[1:]):
)
do_report.add_argument(
'reporoot',
default='.',
nargs='?',
help='root of the git repository',
)
do_report.add_argument(
@@ -123,6 +127,8 @@ def main(argv=sys.argv[1:]):
)
do_cache.add_argument(
'reporoot',
default='.',
nargs='?',
help='root of the git repository',
)
do_cache.add_argument(