mirror of
https://github.com/NixOS/nix.git
synced 2025-11-26 20:20:58 +01:00
before removing isStateComponentTxn
This commit is contained in:
parent
9257f16c85
commit
b7654ab716
10 changed files with 151 additions and 111 deletions
|
|
@ -466,7 +466,7 @@ void Database::splitStatePathRevision(const Path & revisionedStatePath, Path & s
|
|||
|
||||
|
||||
int Database::getNewRevisionNumber(const Transaction & txn, TableId table,
|
||||
const Path & statePath)
|
||||
const Path & statePath, bool update)
|
||||
{
|
||||
//query
|
||||
string data;
|
||||
|
|
@ -482,8 +482,10 @@ int Database::getNewRevisionNumber(const Transaction & txn, TableId table,
|
|||
if(!succeed)
|
||||
throw Error(format("Malformed revision counter value of path '%1%'") % statePath);
|
||||
|
||||
revision++;
|
||||
setString(txn, table, statePath, int2String(revision));
|
||||
if(update){
|
||||
revision++;
|
||||
setString(txn, table, statePath, int2String(revision));
|
||||
}
|
||||
|
||||
return revision;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue