GitRepo.vala
[gitlive] / GitRepo.vala
index 989a32b..d69553c 100644 (file)
@@ -186,6 +186,20 @@ public class GitRepo : Object
        
     }
     
+    public void setActiveTicket(RooTicket ticket, string branchname)
+    {
+       this.createBranchNamed(branchname);
+       FileUtils.set_contents(this.gitdir + "/.gitlive-active-ticket" , ticket.id);
+    }
+    
+    public void createBranchNamed(string branchname)
+    {
+        string[] cmd = { "checkout", "-b" , branchname  };
+        this.git(cmd);
+        this.loadBranches(); // update branch list...
+    }
+    
+    
     /**
      * add:
      * add files to track.