1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

Improve progress indicator

This commit is contained in:
Eelco Dolstra 2017-05-16 16:09:57 +02:00
parent e80257f122
commit b01d62285c
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
26 changed files with 339 additions and 168 deletions

View file

@ -30,13 +30,13 @@ void Store::exportPaths(const Paths & paths, Sink & sink)
std::reverse(sorted.begin(), sorted.end());
std::string doneLabel("paths exported");
logger->incExpected(doneLabel, sorted.size());
//logger->incExpected(doneLabel, sorted.size());
for (auto & path : sorted) {
Activity act(*logger, lvlInfo, format("exporting path %s") % path);
//Activity act(*logger, lvlInfo, format("exporting path %s") % path);
sink << 1;
exportPath(path, sink);
logger->incProgress(doneLabel);
//logger->incProgress(doneLabel);
}
sink << 0;
@ -81,7 +81,7 @@ Paths Store::importPaths(Source & source, std::shared_ptr<FSAccessor> accessor,
info.path = readStorePath(*this, source);
Activity act(*logger, lvlInfo, format("importing path %s") % info.path);
//Activity act(*logger, lvlInfo, format("importing path %s") % info.path);
info.references = readStorePaths<PathSet>(*this, source);