about summary refs log tree commit diff
path: root/src/nix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix.cc')
-rw-r--r--src/nix.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nix.cc b/src/nix.cc
index 42cc4a87c228..4beeb5da8943 100644
--- a/src/nix.cc
+++ b/src/nix.cc
@@ -239,14 +239,16 @@ static void opSuccessor(Strings opFlags, Strings opArgs)
 {
     if (!opFlags.empty()) throw UsageError("unknown flag");
     if (opArgs.size() % 2) throw UsageError("expecting even number of arguments");
-    
+
+    Transaction txn(nixDB); /* !!! this could be a big transaction */ 
     for (Strings::iterator i = opArgs.begin();
          i != opArgs.end(); )
     {
         FSId id1 = parseHash(*i++);
         FSId id2 = parseHash(*i++);
-        registerSuccessor(id1, id2);
+        registerSuccessor(txn, id1, id2);
     }
+    txn.commit();
 }