[gnome-continuous] testbase: Use set_ref_immediate()



commit 668f500e93ed42e2025ac25b2e6708701d1e3c4e
Author: Colin Walters <walters verbum org>
Date:   Thu Mar 12 09:13:12 2015 -0400

    testbase: Use set_ref_immediate()
    
    Writing refs isn't really transactional anyways, and trying to use
    transactions for it casues crashes when the smoketest process unlinks
    the transaction symlink while a build compose is running.

 src/js/tasks/testbase.js |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/js/tasks/testbase.js b/src/js/tasks/testbase.js
index 79d28bb..2798a8d 100644
--- a/src/js/tasks/testbase.js
+++ b/src/js/tasks/testbase.js
@@ -642,15 +642,13 @@ const TestBase = new Lang.Class({
         let buildData = this._buildData;
         if (buildJson != null && this.CompletedTag !== null) {
             let snapshot = buildData['snapshot'];
-            this.ostreeRepo.prepare_transaction(cancellable);
             for (let targetName in buildData['targets']) {
                 let targetRev = buildData['targets'][targetName];
                 let lastSlash = targetName.lastIndexOf('/');
                 let testedRefName = snapshot['osname'] + '/' + this.CompletedTag + 
targetName.substr(lastSlash);
-                this.ostreeRepo.transaction_set_ref(null, testedRefName, targetRev);
+                this.ostreeRepo.set_ref_immediate(null, testedRefName, targetRev, null);
                 print(Format.vprintf("Wrote ref: %s => %s", [testedRefName, targetRev]));
             }
-            this.ostreeRepo.commit_transaction(cancellable);
         } else {
             print("No build json found, not tagging");
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]