upgrade wakatime-cli to v13.0.3

This commit is contained in:
Alan Hamlett 2019-12-04 22:02:51 -08:00
parent b3ed36d3b2
commit 6ec097b9d1
4 changed files with 9 additions and 8 deletions

View File

@ -1,7 +1,7 @@
__title__ = 'wakatime'
__description__ = 'Common interface to the WakaTime api.'
__url__ = 'https://github.com/wakatime/wakatime'
__version_info__ = ('13', '0', '2')
__version_info__ = ('13', '0', '3')
__version__ = '.'.join(__version_info__)
__author__ = 'Alan Hamlett'
__author_email__ = 'alan@wakatime.com'

View File

@ -206,10 +206,11 @@ def parse_arguments():
'local ~/.wakatime.db sqlite3 file to your ' +
'WakaTime Dashboard before exiting. Can be ' +
'"none" or a positive integer number. Defaults ' +
'to 5, meaning for every heartbeat sent while ' +
'online 5 offline heartbeats are synced. Can ' +
'be used without --entity to only sync offline ' +
'activity without generating new heartbeats.')
'to 100, meaning for every heartbeat sent ' +
'while online, 100 offline heartbeats are ' +
'synced. Can be used without --entity to only ' +
'sync offline activity without generating new ' +
'heartbeats.')
parser.add_argument('--today', dest='today',
action='store_true',
help='Prints dashboard time for Today, then exits.')

View File

@ -78,7 +78,7 @@ class Git(BaseProject):
def _get_branch_from_head_file(self, line):
if u(line.strip()).startswith('ref: '):
return u(line.strip().rsplit('/', 1)[-1])
return u(line.strip().split('/', 2)[-1])
return None
def _submodules_supported_for_path(self, path):

View File

@ -36,11 +36,11 @@ class Mercurial(BaseProject):
branch_file = os.path.join(self.configDir, 'branch')
try:
with open(branch_file, 'r', encoding='utf-8') as fh:
return u(fh.readline().strip().rsplit('/', 1)[-1])
return u(fh.readline().strip())
except UnicodeDecodeError: # pragma: nocover
try:
with open(branch_file, 'r', encoding=sys.getfilesystemencoding()) as fh:
return u(fh.readline().strip().rsplit('/', 1)[-1])
return u(fh.readline().strip())
except:
log.traceback(logging.WARNING)
except IOError: # pragma: nocover