aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-04-30 15:17:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-04-30 15:17:21 +0200
commit4783c74e0741df5ce403b857caf98c0f3917cd77 (patch)
treecc7a74c55d1af0601f87aacdb04f0ac0e7ca4e61
parent3f403eb9b99181da0d0ab66d5ee6fc748f7fcf9c (diff)
Don't print "fetching..." if all the repositories being fetched are dir:
-rw-r--r--bpkg/rep-fetch.cxx22
1 files changed, 18 insertions, 4 deletions
diff --git a/bpkg/rep-fetch.cxx b/bpkg/rep-fetch.cxx
index 452392e..ba0c4f3 100644
--- a/bpkg/rep-fetch.cxx
+++ b/bpkg/rep-fetch.cxx
@@ -1131,13 +1131,13 @@ namespace bpkg
fail << "configuration " << c << " has no repositories" <<
info << "use 'bpkg rep-add' to add a repository";
+ for (const lazy_shared_ptr<repository>& r: ua)
+ repos.push_back (r);
+
// Always print "fetching ..." for complements of the root, even if
// there is only one.
//
reason = "";
-
- for (const lazy_shared_ptr<repository>& r: ua)
- repos.push_back (r);
}
else
{
@@ -1180,7 +1180,21 @@ namespace bpkg
// with a pointless "fetching ..." line for this repository.
//
if (repos.size () > 1)
- reason = "";
+ {
+ // Also, as a special case (or hack, if you will), suppress these
+ // lines if all the repositories are directory-based. For such
+ // repositories there will never be any fetch progress nor can
+ // they hang.
+ //
+ for (lazy_shared_ptr<repository> r: repos)
+ {
+ if (!r.load ()->location.directory_based ())
+ {
+ reason = "";
+ break;
+ }
+ }
+ }
}
rep_fetch (o, c, t, repos, o.shallow (), reason);