make --project argument take priority over auto-detected project name. new --alternate-project argument that behaves like --project used to.
This commit is contained in:
parent
652bf480e3
commit
1c73ba9969
1 changed files with 9 additions and 4 deletions
|
@ -157,8 +157,10 @@ def parseArguments(argv):
|
||||||
parser.add_argument('--proxy', dest='proxy',
|
parser.add_argument('--proxy', dest='proxy',
|
||||||
help='optional https proxy url; for example: '+
|
help='optional https proxy url; for example: '+
|
||||||
'https://user:pass@localhost:8080')
|
'https://user:pass@localhost:8080')
|
||||||
parser.add_argument('--project', dest='project_name',
|
parser.add_argument('--project', dest='project',
|
||||||
help='optional project name; auto-discovered project takes priority')
|
help='optional project name')
|
||||||
|
parser.add_argument('--alternate-project', dest='alternate_project',
|
||||||
|
help='optional alternate project name; auto-discovered project takes priority')
|
||||||
parser.add_argument('--disableoffline', dest='offline',
|
parser.add_argument('--disableoffline', dest='offline',
|
||||||
action='store_false',
|
action='store_false',
|
||||||
help='disables offline time logging instead of queuing logged time')
|
help='disables offline time logging instead of queuing logged time')
|
||||||
|
@ -444,10 +446,13 @@ def main(argv=None):
|
||||||
if not args.notfile:
|
if not args.notfile:
|
||||||
project = find_project(args.targetFile, configs=configs)
|
project = find_project(args.targetFile, configs=configs)
|
||||||
branch = None
|
branch = None
|
||||||
project_name = args.project_name
|
project_name = args.project
|
||||||
if project:
|
if project:
|
||||||
branch = project.branch()
|
branch = project.branch()
|
||||||
|
if not project_name:
|
||||||
project_name = project.name()
|
project_name = project.name()
|
||||||
|
if not project_name:
|
||||||
|
project_name = args.alternate_project
|
||||||
|
|
||||||
if send_heartbeat(
|
if send_heartbeat(
|
||||||
project=project_name,
|
project=project_name,
|
||||||
|
|
Loading…
Reference in a new issue