1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 20:51:00 +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

@ -664,6 +664,13 @@ void Database::setStateRevisions(const Transaction & txn, TableId revisions_tabl
//get all paths that point to the same state (using shareing) and check if one of them equals the rootStatePath
PathSet sharedWith = getSharedWithPathSetRecTxn(txn, statePath);
/*
printMsg(lvlError, format("SP RootSP '%1%' - '%2%'") % statePath % rootStatePath);
for (PathSet::const_iterator j = sharedWith.begin(); j != sharedWith.end(); ++j)
printMsg(lvlError, format("SP SW '%1%'") % *j);
*/
if(statePath == rootStatePath || sharedWith.find(rootStatePath) != sharedWith.end())
metadata.push_back(comment);
else