* New query `nix --query --predecessors' to print the predecessors of

a Nix expression.
This commit is contained in:
Eelco Dolstra 2003-10-10 15:25:21 +00:00
parent 0abe185688
commit 1d61e473c8
5 changed files with 29 additions and 2 deletions

View file

@ -104,6 +104,14 @@ void registerSuccessor(const Transaction & txn,
}
Paths queryPredecessors(const Path & sucPath)
{
Paths revs;
nixDB.queryStrings(noTxn, dbSuccessorsRev, sucPath, revs);
return revs;
}
void registerSubstitute(const Path & srcPath, const Path & subPath)
{
Transaction txn(nixDB);