Handle "os.mbed.com" URL as Mercurial (hg) repository

This commit is contained in:
Ivan Kravets
2018-01-24 14:56:15 +02:00
parent e615e7529e
commit c0b277d9c8
2 changed files with 8 additions and 1 deletions

View File

@ -553,7 +553,9 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin):
hg_conditions = [
# Handle Developer Mbed URL
# (https://developer.mbed.org/users/user/code/package/)
text.startswith("https://developer.mbed.org")
# (https://os.mbed.com/users/user/code/package/)
text.startswith("https://developer.mbed.org"),
text.startswith("https://os.mbed.com")
]
if any(git_conditions):
url = "git+" + text

View File

@ -82,6 +82,11 @@ def test_pkg_input_parser():
("package", None,
"hg+https://developer.mbed.org/users/user/code/package/")
],
[
"https://os.mbed.com/users/user/code/package/",
("package", None,
"hg+https://os.mbed.com/users/user/code/package/")
],
[
"https://github.com/user/package#v1.2.3",
("package", None, "git+https://github.com/user/package#v1.2.3")