From f359b9981ba3d81e33981018c4bcb83ab45830a3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Sep 2021 19:57:45 +0200 Subject: [PATCH] Generations -> profile versions --- src/libstore/profiles.cc | 12 ++++++------ src/nix/profile-rollback.md | 4 ++-- src/nix/profile.cc | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc index 9959da535..aca0ea5ad 100644 --- a/src/libstore/profiles.cc +++ b/src/libstore/profiles.cc @@ -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 & 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; diff --git a/src/nix/profile-rollback.md b/src/nix/profile-rollback.md index fccdbb10e..6bb75aa5e 100644 --- a/src/nix/profile-rollback.md +++ b/src/nix/profile-rollback.md @@ -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 diff --git a/src/nix/profile.cc b/src/nix/profile.cc index 4c4a9bff4..ab0e88fa1 100644 --- a/src/nix/profile.cc +++ b/src/nix/profile.cc @@ -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