project.py: Allow to specify the name of the generated project

Eclipse won't allow to open multiple projects with the same name.

Add a --name option to the project.py to allow to specify the name
of the generated project. This will allow to have multiple Gerrit
workspaces in Eclipse at the same time.

Change-Id: I6f6809a0a42ee21262eadd5125beb344cbaf7dfe
This commit is contained in:
David Pursehouse
2016-05-17 21:31:27 +09:00
parent 1cb39c732d
commit 6925f8a7e4

View File

@@ -42,6 +42,8 @@ opts.add_option('--no-src', dest='no_src', action='store_true',
help='do not attach sources')
opts.add_option('--plugins', help='create eclipse projects for plugins',
action='store_true')
opts.add_option('--name', help='name of the generated project',
action='store', default='gerrit', dest='project_name')
args, _ = opts.parse_args()
def _query_classpath(targets):
@@ -223,7 +225,7 @@ try:
except CalledProcessError as err:
exit(1)
gen_project()
gen_project(args.project_name)
gen_classpath()
gen_factorypath()