mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Fix package installing with VCS branch for Python 2.7.3 // Resolve #885
This commit is contained in:
@ -32,6 +32,9 @@ PlatformIO 3.0
|
||||
* Use C++11 by default for CLion IDE based projects
|
||||
(`pull #873 <https://github.com/platformio/platformio-core/pull/873>`_)
|
||||
* Escape project path when Glob matching is used
|
||||
* Fixed package installing with VCS branch for Python 2.7.3
|
||||
(`issue #885 <https://github.com/platformio/platformio-core/issues/885>`_)
|
||||
|
||||
|
||||
-------
|
||||
|
||||
|
@ -28,18 +28,19 @@ class VCSClientFactory(object):
|
||||
def newClient(src_dir, remote_url):
|
||||
result = urlparse(remote_url)
|
||||
type_ = result.scheme
|
||||
tag = None
|
||||
if not type_ and remote_url.startswith("git@"):
|
||||
type_ = "git"
|
||||
elif "+" in result.scheme:
|
||||
type_, _ = result.scheme.split("+", 1)
|
||||
remote_url = remote_url[len(type_) + 1:]
|
||||
if result.fragment:
|
||||
remote_url = remote_url.rsplit("#", 1)[0]
|
||||
if "#" in remote_url:
|
||||
remote_url, tag = remote_url.rsplit("#", 1)
|
||||
if not type_:
|
||||
raise PlatformioException("VCS: Unknown repository type %s" %
|
||||
remote_url)
|
||||
obj = getattr(modules[__name__], "%sClient" % type_.title())(
|
||||
src_dir, remote_url, result.fragment)
|
||||
src_dir, remote_url, tag)
|
||||
assert isinstance(obj, VCSClientBase)
|
||||
return obj
|
||||
|
||||
|
Reference in New Issue
Block a user