Lines Matching refs:this

30              $this->path = $_REQUEST['dwc__repro'];
33 $this->path = $this->get_conf_repro();
35 $this->default_repro = $this->path;
36 $this->status_message = array();
37 $this->selected_branch="";
38 $this->sqlite = 0;
39 $binary = $this->getConf('git_binary');
40 if(isset($binary)) $this->git=$binary;
41 $fname_hash = md5($this->path);
48 $this->db_name=$inf[$fname_hash];
49 $this->remote_url=$this->set_githubURL();
52 $this->db_name=$this->new_dbname($fname_hash,$names_fname,$inf);
56 $this->db_name=$this->new_dbname($fname_hash,$names_fname, false);
74 $inf_array['git' . $count] = $this->path;
94 $fname_hash = md5($this->path);
101 if($this->save_dbnames_ser($names_fname,serialize($inf))) {
104 else $this->error(5);
115 return $this->db_name;
120 $this->db_name = $name;
126 list($base,$count) = explode('_',$this->db_name);
129 $this->remote_url = $inf[$slot];
131 else $this->remote_url = "";
132 return $this->remote_url . " slot=$slot";
137 $repro = $this->getConf('default_git');
158 if(!$db->init($this->db_name,dirname(__FILE__).'/db/')){
165 $this->sqlite = $db;
173 if(!chdir($this->path)) {
174 if(file_exists($this->path)) {
175 $this->error(1);
177 else $this->error(0);
184 $this->status_message = array();
185 if(!$this->chdir()) return false;
188 exec("$this->git fetch origin",$retv,$exit_code);
190 …$this->status_message = array_merge(array(getcwd(),"$this->git fetch origin", $status),$this->stat…
193 exec("$this->git merge origin",$retv, $exit_code);
195 …$this->status_message = array_merge(array(getcwd(),"$this->git merge origin", $status),$this->stat…
200 …$this->status_message = array_merge(array(getcwd(),"git commit", $status),$this->status_message,$r…
204 exec("$this->git add .",$retv_add, $exit_code);
206 …$this->status_message = array_merge(array(getcwd(),"git add . ", $status),$this->status_message,$r…
209 exec("$this->git pull",$retv, $exit_code);
211 …$this->status_message = array_merge(array(getcwd(),"git pull", $status),$this->status_message,$ret…
215 exec("$this->git checkout $branch",$retv, $exit_code);
217 …$this->status_message = array_merge(array(getcwd(),"git checkout $branch", $status),$this->status_…
218 $this->set_branches();
221 exec("$this->git config --get remote.origin.url",$retv, $exit_code);
222 $this->remote_url = $retv[0];
223 $this->remote_url = preg_replace('/:(?!\/)/',"/",$this->remote_url);
224 $this->remote_url = preg_replace('/^\s*.*?@/',"",$this->remote_url);
225 if(!preg_match('/http/',$this->remote_url)) {
226 if(preg_match('/github/',$this->remote_url)) {
227 $this->remote_url = 'https://'. $this->remote_url;
232 …$this->status_message = array_merge(array(getcwd(),"git checkout $branch", $status),$this->status_…
233 if($this->remote_url) {
234 $this->status_message[] = "Remote URL: $this->remote_url";
243 if(!$this->remote_url) return false;
244 if($this->commit_url) return $this->commit_url;
245 $url = preg_replace('/\.git$/',"", $this->remote_url) . '/commit/';
246 $this->commit_url=$url;
251 return $this->remote_url;
255 $this->repros = array();
256 $this->repros[] = $this->html_option($this->path,true);
257 $conf_repro = $this->get_conf_repro();
258 if($this->path != $conf_repro) {
259 $this->repros[] = $this->html_option($conf_repro);
266 $this->repros[] = $this->html_option($git_dir);
271 $this->repros[] = $this->html_option(DW_COMMITS_DB . $git_dir);
279 echo implode("\n",$this->repros);
283 if(!$this->chdir()) return false;
284 $this->branches = array();
285 exec("$this->git branch",$retv, $exit_code);
289 $this->selected_branch = $matches[1];
290 $this->branches[] = $this->html_option($matches[1],true);
293 $this->branches[] = $this->html_option($branch);
307 echo implode("\n",$this->branches);
311 if($this->selected_branch) return $this->selected_branch;
312 $this->selected_branch = 'master'; //needed for db column if and when implemented
318 return $this->default_repro;
325 $this->status_message = array();
326 if(!$this->chdir()) return false;
327 exec("$this->git status",$retv, $exit_code);
328 $this->status_message =
329 array_merge(array(getcwd(),"git status"),$this->status_message,$retv);
335 $path = $this->path;
351 $status = $this->status_message;
352 $this->status_message = array();
354 $current_git = "<b>Git:</b> $this->path<br/>";
362 if(!$this->chdir()) return false;
373 $results = $this->sqlite->query("select count(*) from git_commits");
375 $start_number = $this->res2single($results);
380 $handle = popen("$this->git log --since=$since", "r");
423 $this->insert($author,$timestamp,$gitid,$msg,$table);
436 $results = $this->sqlite->query("select count(*) from git_commits");
437 $end_number = $this->res2single($results);
447 …if($this->sqlite->query("INSERT OR IGNORE INTO $table (author,timestamp,gitid,msg,prefix,gitbranch…
448 $author,$timestamp,$gitid,$msg,$prefix,$this->selected_branch)){
472 $author = $this->construct_term('author',$val);
476 $branch = $this->construct_term('gitbranch',$val);
480 $term1 = $this->construct_term('msg',$val);
483 $term2 = $this->construct_term('msg',$val);
486 $date_1 = $this->get_timestamp($val);
489 $date_2 = $this->get_timestamp($val);
495 $msg = $this->construct_msg_clause($term1,$term2,$query['OP_1']);
496 $ab_clause = $this->construct_ab_clause($author,$branch,$query['OP_2'],$msg);
498 $date_clause = $this->construct_date_clause($date_1,$date_2,$attach);
501 $this->error(6,1);
504 …$res = $this->sqlite->query("SELECT timestamp,author,msg,gitid,gitbranch FROM git_commits WHERE $q…
506 $this->error(4);
510 $arr = $this->sqlite->res2arr($res);
518 $this->set_commit_url();
521 $regex = $this->get_hilite_regex($query);
525 $output .= $this->format_tablerow($row,$regex);
554 if($this->commit_url) {
555 $commit = $this->format_commit_url($val);
594 $this->set_commit_url();
597 $regex = $this->get_hilite_regex($query);
601 $output .= $this->format_row($row,$regex);
626 if($this->commit_url) {
628 $result .= $this->format_commit_url($val);
650 $url = $this->commit_url . $val;
723 if(method_exists($this->sqlite,res2single)){
724 return $this->sqlite->res2single($res);
726 $arr = $this->sqlite->res2row($res);
741 $this->error(7);
748 $this->error(7);
791 $this->save_dbnames_ser($names_fname,serialize($inf));
808 $output .= "<b>" . $this->getLang('db_file'). "</b> $entry";
811 if(($url = $this->dwc_element('url', $matches[1], $inf))!== false) {
812 $output .= "<b>" . $this->getLang('remote_url'). "</b> $url<br />";
815 $git = $this->dwc_element('git', $matches[1], $inf);
818 $output .= "<b>". $this->getLang('git_missing'). "</b> $git<br />";
820 else $output .= "<b>". $this->getLang('git_local'). "</b> $git<br />";
839 $this->sqlite->query("DROP TABLE git_commits");
840 …$this->sqlite->query('CREATE TABLE git_commits(author TEXT,timestamp INTEGER,gitid TEXT,msg TEXT, …
841 $this->populate($timestamp_start);
842 $results = $this->sqlite->query("select count(*) from git_commits");
843 $res = $this->res2single($results);