2 XObject = imports.XObject.XObject;
3 XMLHttpRequest = imports.XMLHttpRequest.XMLHttpRequest;
4 Netrc = imports.Netrc.Netrc;
5 Date = imports.Date.Date;
19 fetch: function(repo, callback)
21 // have we got the status in the last 15 mins..
22 // we should not need to get it again... - it's probably not changed.
24 if (this.list.length) {
29 // do the request to get the task..
30 var r = new XMLHttpRequest({
31 onreadystatechange : function() {
33 if (this.status != 4) {
38 var res = JSON.parse(this.responseText);
40 //print(JSON.stringify(res,null,4))
41 //print([ res.success , res.data.length ]);
42 if (!res.success || !res.data.length) {
43 print("NO tasks returned");
48 //print("Current task:" + JSON.stringify(_this.curTask,null,4));
53 var netrc = Netrc.forHost('git.roojs.com');
56 "http://roojs.com/admin.php/Roo/Projects"
57 ,true, netrc.login, netrc.password );
58 // print("Getting current task: " + "http://roojs.com/admin.php/Roo/mtrack_ticket?repo_shortname=" + repo.name);
80 //-------------- testing
84 Tasks.notify( { repo : imports.Scm.Repo.Repo.get('gitlive') } );