mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
fix #25 by using remote directory as branch for subversion projects
This commit is contained in:
parent
4610ff3e0c
commit
e43dcc1c83
@ -13,7 +13,7 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
__title__ = 'wakatime'
|
__title__ = 'wakatime'
|
||||||
__version__ = '2.1.2'
|
__version__ = '2.1.3'
|
||||||
__author__ = 'Alan Hamlett'
|
__author__ = 'Alan Hamlett'
|
||||||
__license__ = 'BSD'
|
__license__ = 'BSD'
|
||||||
__copyright__ = 'Copyright 2014 Alan Hamlett'
|
__copyright__ = 'Copyright 2014 Alan Hamlett'
|
||||||
|
@ -35,9 +35,7 @@ class Subversion(BaseProject):
|
|||||||
return u(self.info['Repository Root'].split('/')[-1])
|
return u(self.info['Repository Root'].split('/')[-1])
|
||||||
|
|
||||||
def branch(self):
|
def branch(self):
|
||||||
if self.base:
|
return u(self.info['URL'].split('/')[-1])
|
||||||
u(os.path.basename(self.base))
|
|
||||||
return None
|
|
||||||
|
|
||||||
def _find_binary(self):
|
def _find_binary(self):
|
||||||
if self.binary_location:
|
if self.binary_location:
|
||||||
@ -70,17 +68,11 @@ class Subversion(BaseProject):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
if stdout:
|
if stdout:
|
||||||
interesting = [
|
|
||||||
'Repository Root',
|
|
||||||
'Repository UUID',
|
|
||||||
'URL',
|
|
||||||
]
|
|
||||||
for line in stdout.splitlines():
|
for line in stdout.splitlines():
|
||||||
if isinstance(line, bytes):
|
if isinstance(line, bytes):
|
||||||
line = bytes.decode(line)
|
line = bytes.decode(line)
|
||||||
line = line.split(': ', 1)
|
line = line.split(': ', 1)
|
||||||
if line[0] in interesting:
|
info[line[0]] = line[1]
|
||||||
info[line[0]] = line[1]
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
def _find_project_base(self, path, found=False):
|
def _find_project_base(self, path, found=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user