upgrade wakatime-cli to v2.0.7 to fix #25
This commit is contained in:
parent
986e592d1e
commit
6b6f60d8e8
3 changed files with 33 additions and 2 deletions
|
@ -3,6 +3,18 @@ History
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
||||||
|
2.0.7 (2014-08-27)
|
||||||
|
++++++++++++++++++
|
||||||
|
|
||||||
|
- find svn binary location from common install directories
|
||||||
|
|
||||||
|
|
||||||
|
2.0.6 (2014-08-07)
|
||||||
|
++++++++++++++++++
|
||||||
|
|
||||||
|
- encode json data as str when passing to urllib
|
||||||
|
|
||||||
|
|
||||||
2.0.5 (2014-07-25)
|
2.0.5 (2014-07-25)
|
||||||
++++++++++++++++++
|
++++++++++++++++++
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
__title__ = 'wakatime'
|
__title__ = 'wakatime'
|
||||||
__version__ = '2.0.6'
|
__version__ = '2.0.7'
|
||||||
__author__ = 'Alan Hamlett'
|
__author__ = 'Alan Hamlett'
|
||||||
__license__ = 'BSD'
|
__license__ = 'BSD'
|
||||||
__copyright__ = 'Copyright 2014 Alan Hamlett'
|
__copyright__ = 'Copyright 2014 Alan Hamlett'
|
||||||
|
|
|
@ -32,6 +32,7 @@ except NameError:
|
||||||
|
|
||||||
|
|
||||||
class Subversion(BaseProject):
|
class Subversion(BaseProject):
|
||||||
|
binary_location = None
|
||||||
|
|
||||||
def process(self):
|
def process(self):
|
||||||
return self._find_project_base(self.path)
|
return self._find_project_base(self.path)
|
||||||
|
@ -44,13 +45,31 @@ class Subversion(BaseProject):
|
||||||
unicode(os.path.basename(self.base))
|
unicode(os.path.basename(self.base))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def _find_binary(self):
|
||||||
|
if self.binary_location:
|
||||||
|
return self.binary_location
|
||||||
|
locations = [
|
||||||
|
'svn',
|
||||||
|
'/usr/bin/svn',
|
||||||
|
'/usr/local/bin/svn',
|
||||||
|
]
|
||||||
|
for location in locations:
|
||||||
|
try:
|
||||||
|
Popen([location, '--version'])
|
||||||
|
self.binary_location = location
|
||||||
|
return location
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.binary_location = 'svn'
|
||||||
|
return 'svn'
|
||||||
|
|
||||||
def _get_info(self, path):
|
def _get_info(self, path):
|
||||||
info = OrderedDict()
|
info = OrderedDict()
|
||||||
stdout = None
|
stdout = None
|
||||||
try:
|
try:
|
||||||
os.environ['LANG'] = 'en_US'
|
os.environ['LANG'] = 'en_US'
|
||||||
stdout, stderr = Popen([
|
stdout, stderr = Popen([
|
||||||
'svn', 'info', os.path.realpath(path)
|
self._find_binary(), 'info', os.path.realpath(path)
|
||||||
], stdout=PIPE, stderr=PIPE).communicate()
|
], stdout=PIPE, stderr=PIPE).communicate()
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue