From 6483b91ee106b0fa4d238c28df9ac56f29ae96fd Mon Sep 17 00:00:00 2001
From: Daniel Brown <ddb@star.sr.bham.ac.uk>
Date: Wed, 7 Aug 2013 13:13:18 +0100
Subject: [PATCH] removing HEAD from branch selection, making develop default

---
 pykat/testing/web/templates/finesse_test.html | 8 +++++++-
 pykat/testing/web/web_interface.py            | 5 ++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/pykat/testing/web/templates/finesse_test.html b/pykat/testing/web/templates/finesse_test.html
index b4fc6ca..15fcfca 100644
--- a/pykat/testing/web/templates/finesse_test.html
+++ b/pykat/testing/web/templates/finesse_test.html
@@ -442,7 +442,13 @@
                     blist.empty();
                     
                     for(var i=0; i<branches.length; i++){
-                        blist.append($('<option>', { value: branches[i], text: branches[i]}));
+                        var opt = $('<option>', { value: branches[i], text: branches[i]});
+                        
+                        if (branches[i] == "develop") {
+                            opt.attr("selected","selected");
+                        }
+                        
+                        blist.append(opt);
                     }
                     
                     updateLogEntries();
diff --git a/pykat/testing/web/web_interface.py b/pykat/testing/web/web_interface.py
index 3869db1..21a405b 100644
--- a/pykat/testing/web/web_interface.py
+++ b/pykat/testing/web/web_interface.py
@@ -400,7 +400,10 @@ def finesse_get_branches():
     for b in out.split("\n"):
         vals = b.split("/")
         if len(vals) >= 3:
-            branches.append(vals[2].split(" ")[0])
+            branch = vals[2].split(" ")[0]
+            
+            if branch != "HEAD":
+                branches.append(branch)
 
     return jsonify(branches=branches)
     
-- 
GitLab