Generations -> profile versions

This commit is contained in:
Eelco Dolstra 2021-09-14 19:57:45 +02:00
parent 229ad612b8
commit f359b9981b
3 changed files with 9 additions and 9 deletions

View File

@ -126,9 +126,9 @@ void deleteGeneration(const Path & profile, GenerationNumber gen)
static void deleteGeneration2(const Path & profile, GenerationNumber gen, bool dryRun)
{
if (dryRun)
printInfo(format("would remove generation %1%") % gen);
printInfo(format("would remove profile version %1%") % gen);
else {
printInfo(format("removing generation %1%") % gen);
printInfo(format("removing profile version %1%") % gen);
deleteGeneration(profile, gen);
}
}
@ -142,7 +142,7 @@ void deleteGenerations(const Path & profile, const std::set<GenerationNumber> &
auto [gens, curGen] = findGenerations(profile);
if (gensToDelete.count(*curGen))
throw Error("cannot delete current generation of profile %1%'", profile);
throw Error("cannot delete current version of profile %1%'", profile);
for (auto & i : gens) {
if (!gensToDelete.count(i.number)) continue;
@ -254,12 +254,12 @@ void switchGeneration(
if (!dst) {
if (dstGen)
throw Error("generation %1% does not exist", *dstGen);
throw Error("profile version %1% does not exist", *dstGen);
else
throw Error("no generation older than the current (%1%) exists", curGen.value_or(0));
throw Error("no profile version older than the current (%1%) exists", curGen.value_or(0));
}
notice("switching from generation %d to %d", curGen.value_or(0), dst->number);
notice("switching profile from version %d to %d", curGen.value_or(0), dst->number);
if (dryRun) return;

View File

@ -6,14 +6,14 @@ R""(
```console
# nix profile rollback
switching from generation 519 to 518
switching profile from version 519 to 518
```
* Switch your default profile to version 510:
```console
# nix profile rollback --to 510
switching from generation 518 to 510
switching profile from version 518 to 510
```
# Description

View File

@ -559,7 +559,7 @@ struct CmdProfileRollback : virtual StoreCommand, MixDefaultProfile, MixDryRun
std::string description() override
{
return "roll back to the previous version or a specified version of this profile";
return "roll back to the previous version or a specified version of a profile";
}
std::string doc() override