upgrade wakatime-cli to v6.0.0

This commit is contained in:
Alan Hamlett
2016-04-29 00:04:46 +02:00
parent 02e2bfcad2
commit 260eedb31d
8 changed files with 748 additions and 62 deletions

View File

@ -33,7 +33,7 @@ REV_CONTROL_PLUGINS = [
]
def get_project_info(configs, args):
def get_project_info(configs, heartbeat):
"""Find the current project and branch.
First looks for a .wakatime-project file. Second, uses the --project arg.
@ -50,14 +50,14 @@ def get_project_info(configs, args):
plugin_name = plugin_cls.__name__.lower()
plugin_configs = get_configs_for_plugin(plugin_name, configs)
project = plugin_cls(args.entity, configs=plugin_configs)
project = plugin_cls(heartbeat['entity'], configs=plugin_configs)
if project.process():
project_name = project_name or project.name()
branch_name = project.branch()
break
if project_name is None:
project_name = args.project
project_name = heartbeat.get('project')
if project_name is None or branch_name is None:
@ -66,14 +66,14 @@ def get_project_info(configs, args):
plugin_name = plugin_cls.__name__.lower()
plugin_configs = get_configs_for_plugin(plugin_name, configs)
project = plugin_cls(args.entity, configs=plugin_configs)
project = plugin_cls(heartbeat['entity'], configs=plugin_configs)
if project.process():
project_name = project_name or project.name()
branch_name = branch_name or project.branch()
break
if project_name is None:
project_name = args.alternate_project
project_name = heartbeat.get('alternate_project')
return project_name, branch_name