From 2667fad8bf6e7ef6ef1894ab49a3bdc5cc858607 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 14 Nov 2018 22:19:50 +0300 Subject: Add support for repository location compound schemes (git+https, etc) --- load/load.cxx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'load/load.cxx') diff --git a/load/load.cxx b/load/load.cxx index 97cd133..c032137 100644 --- a/load/load.cxx +++ b/load/load.cxx @@ -94,7 +94,7 @@ using internal_repositories = vector; // will allow handling CI requests for bpkg repositories. // // The current thinking is that the CI handler will be able to "suggest" -// this using (the planned) cache:file+dir:// form. +// this using (the planned) cache:dir+file:// form. // static internal_repositories load_repositories (path p) @@ -138,10 +138,7 @@ load_repositories (path p) try { - repository_url u (tl[i].value); - - r.location = repository_location (u, - guess_type (u, false /* local */)); + r.location = repository_location (tl[i].value); } catch (const invalid_argument& e) { @@ -277,16 +274,17 @@ changed (const string& tenant, database& db) { strings names; - for (auto& r: repos) + for (const internal_repository& r: repos) { shared_ptr pr ( db.find (repository_id (tenant, r.location.canonical_name ()))); - if (pr == nullptr || r.location.string () != pr->location.string () || - r.display_name != pr->display_name || - r.cache_location.path () != pr->cache_location.path () || - file_mtime (r.packages_path ()) != pr->packages_timestamp || + if (pr == nullptr || + r.location.string () != pr->location.string () || + r.display_name != pr->display_name || + r.cache_location.path () != pr->cache_location.path () || + file_mtime (r.packages_path ()) != pr->packages_timestamp || file_mtime (r.repositories_path ()) != pr->repositories_timestamp || !pr->internal) return true; -- cgit v1.1