diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-01-22 14:59:34 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-02-12 17:43:40 +0300 |
commit | 55ce3cfd66dd0fc09db938cdbda4e5238bf01ab1 (patch) | |
tree | 951ccd1ce968586f031ca83fe86c21d58614d22d | |
parent | 8135da3952d4f6dc876ba45935b4bb80749f38cc (diff) |
Adapt to making repository_url(string) ctor explicit
-rw-r--r-- | libbrep/common.hxx | 11 | ||||
-rw-r--r-- | load/load.cxx | 11 |
2 files changed, 15 insertions, 7 deletions
diff --git a/libbrep/common.hxx b/libbrep/common.hxx index fc03a9a..9fcb5c2 100644 --- a/libbrep/common.hxx +++ b/libbrep/common.hxx @@ -205,13 +205,18 @@ namespace brep // using bpkg::repository_type; + // repository_url + // + using bpkg::repository_url; + // repository_location // using bpkg::repository_location; - #pragma db map type(repository_location) as(string) \ - to((?).string ()) \ - from(brep::repository_location ((?), brep::repository_type::bpkg)) + #pragma db map type(repository_location) as(string) \ + to((?).url ().string ()) \ + from(brep::repository_location (brep::repository_url (?), \ + brep::repository_type::bpkg)) // Version comparison operators. // diff --git a/load/load.cxx b/load/load.cxx index db552e4..2b12ee1 100644 --- a/load/load.cxx +++ b/load/load.cxx @@ -116,7 +116,8 @@ load_repositories (path p) try { - r.location = repository_location (tl[i].value, repository_type::bpkg); + r.location = repository_location (repository_url (tl[i].value), + repository_type::bpkg); } catch (const invalid_argument& e) { @@ -163,8 +164,9 @@ load_repositories (path p) if (cache_path.relative ()) cache_path = p.directory () / cache_path; - r.cache_location = repository_location (cache_path.string (), - repository_type::bpkg); + r.cache_location = repository_location ( + repository_url (cache_path.string ()), + repository_type::bpkg); // Created from the absolute path repository location can not be // other than absolute. @@ -580,7 +582,8 @@ load_repositories (const shared_ptr<repository>& rp, database& db) // Convert the relative repository location to remote one, leave remote // location unchanged. // - rl = repository_location (rm.location.string (), rp->location); + rl = repository_location (repository_url (rm.location.string ()), + rp->location); } catch (const invalid_argument&) { |