aboutsummaryrefslogtreecommitdiff
path: root/bdep/init.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-14 14:34:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-03-14 14:34:12 +0200
commit7acf8ce6111e3740decd39b92c3383fcbdd00e21 (patch)
tree2c9c6d75bbac9b3b8a4dc9e7b46df01ba0ca3bf2 /bdep/init.cxx
parentc8f2a2c0776aee57af6af10d4a0128befbc1fdeb (diff)
Implement fetch command
Diffstat (limited to 'bdep/init.cxx')
-rw-r--r--bdep/init.cxx24
1 files changed, 19 insertions, 5 deletions
diff --git a/bdep/init.cxx b/bdep/init.cxx
index f41a62b..5fce13f 100644
--- a/bdep/init.cxx
+++ b/bdep/init.cxx
@@ -68,8 +68,20 @@ namespace bdep
// We do each configuration in a separate transaction so that our state
// reflects the bpkg configuration as closely as possible.
//
+ bool first (true);
for (const shared_ptr<configuration>& c: cfgs)
{
+ // If we are initializing in multiple configurations, separate them with
+ // a blank line and print the configuration name/directory.
+ //
+ if (verb && cfgs.size () > 1)
+ {
+ text << (first ? "" : "\n")
+ << "initializing in configuration " << *c;
+
+ first = false;
+ }
+
transaction t (db.begin ());
// Add project repository to the configuration. Note that we don't fetch
@@ -97,6 +109,11 @@ namespace bdep
continue;
}
+ // If we are initializing multiple packages, print their names.
+ //
+ if (verb && pkgs.size () > 1)
+ text << "initializing package " << p.name;
+
c->packages.push_back (package_state {p.name});
}
@@ -119,9 +136,8 @@ namespace bdep
const dir_path& prj (pp.project);
- text << prj;
- for (const package_location& pl: pp.packages)
- text << " " << pl.name << " " << (prj / pl.path);
+ if (verb)
+ text << "initializing project " << prj;
// Create .bdep/.
//
@@ -187,8 +203,6 @@ namespace bdep
//
cmd_init (o, prj, db, cfgs, pp.packages);
- //@@ TODO: print project/package(s) being initialized? (analog to new?)
-
return 0;
}
}