From 1d61e473c88568fae7ef5edebc77acd53e4126f9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 10 Oct 2003 15:25:21 +0000 Subject: * New query `nix --query --predecessors' to print the predecessors of a Nix expression. --- src/store.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/store.cc') diff --git a/src/store.cc b/src/store.cc index 69532071310f..3e755a0d1a9a 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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); -- cgit 1.4.1