3 * concept is to merge commits from a live or working tree
4 * into the 'release tree'
7 * step 1 = render the log of differences..
11 require_once 'MTrackWeb/Log.php';
13 class MTrackWeb_Merger extends MTrackWeb_Log {
16 // function getAuth() - from log..
22 $this->pi = empty($pi) ? '' : ($pi . $this->bootLoader->ext);
23 $this->repo = DB_DataObject::factory('mtrack_repos');
24 $this->filename = $this->repo->loadFromPath($this->pi);
28 if (!$this->repo->id) {
29 return HTML_FlexyFramework::run('Browse');
32 if (!$this->projectPerm($this->repo->project_id, 'MTrack.Repos', 'S')) {
33 return HTML_FlexyFramework::run('Noperm'); // noperm = loggedin -> need more perms / not.. try loggin in..
40 $this->repo->debug = 1;
41 $ar = $this->repo->history("/", 10, "rev", "$release..$live");
42 //echo '<PRE>';print_R($ar);
44 // need to get a 2 dimensional array of
45 // files along top, and commints down.
47 foreach($ar as $commit) {
48 $files = $commit->files;
50 'commit' => $commit->ctime,
51 'desc' => $commit->changelog
53 foreach($files as $f=>$data) {
54 $row[$f] = $commit->rev;
59 // this might result in alot of white boxes where you can
60 // let's see what it looks like..
61 echo '<PRE>';print_R($cfiles);
62 echo '<PRE>';print_R($rows);