1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 12:10:59 +01:00

Fixed bugs in revertToRevision and getSharedWithPathSetRecTxn. Users can now also revert to older revisions.

This commit is contained in:
Wouter den Breejen 2007-09-03 12:13:22 +00:00
parent 094c69ad19
commit 68cb244c90
10 changed files with 69 additions and 31 deletions

View file

@ -177,7 +177,7 @@ static void revertToRevision(Strings opFlags, Strings opArgs)
bool recursive = revert_recursively;
store->revertToRevision(componentPath, derivationPath, statePath, revision_arg, recursive);
store->revertToRevision(statePath, revision_arg, recursive);
}
@ -486,8 +486,23 @@ void run(Strings args)
RevisionClosureTS timestamps;
bool b = store->queryStateRevisions("/nix/state/aacs4qpi9jzg4vmhj09d0ichframh22x-hellohardcodedstateworld-1.0-test", revisions, timestamps, 0);
return;
*/
store = openStore();
/*
PathSet sharedWith = getSharedWithPathSetRecTxn(noTxn, "/nix/state/1kjxymaxf0i6qp5k8ggacc06bzbi4b82-hellohardcodedstateworld-1.0-test");
for (PathSet::const_iterator j = sharedWith.begin(); j != sharedWith.end(); ++j)
printMsg(lvlError, format("RootSP SW '%1%'") % *j);
printMsg(lvlError, format("------------"));
sharedWith = getSharedWithPathSetRecTxn(noTxn, "/nix/state/7c9azkk6qfk18hsvw4a5d8vk1p6qryk0-hellohardcodedstateworld-1.0-test");
for (PathSet::const_iterator j = sharedWith.begin(); j != sharedWith.end(); ++j)
printMsg(lvlError, format("RootSP SW '%1%'") % *j);
return;
*/
/* test */
for (Strings::iterator i = args.begin(); i != args.end(); ) {