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:
parent
094c69ad19
commit
68cb244c90
10 changed files with 69 additions and 31 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue