diff --git a/HISTORY.rst b/HISTORY.rst index e52ded32..19035064 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -32,6 +32,9 @@ PlatformIO 3.0 * Use C++11 by default for CLion IDE based projects (`pull #873 `_) * Escape project path when Glob matching is used +* Fixed package installing with VCS branch for Python 2.7.3 + (`issue #885 `_) + ------- diff --git a/platformio/vcsclient.py b/platformio/vcsclient.py index c7519e61..b06df1f3 100644 --- a/platformio/vcsclient.py +++ b/platformio/vcsclient.py @@ -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