MTrack/SCM/Git/CommitHookBridge.php
[web.mtrack] / MTrack / SCM / Git / CommitHookBridge.php
index 4b84a0f..dc8bf04 100644 (file)
@@ -1,7 +1,7 @@
-<?php  
-require_once 'Interface/CommitHookBridge.php';
-require_once 'Repo.php';
+<?php
 
+require_once 'MTrack/Interface/CommitHookBridge.php';
+require_once 'MTrack/Repo.php';
 
 // needs to be run from git-recieve (and it has to be the only thing run.
 
@@ -20,16 +20,17 @@ class MTrack_SCM_Git_CommitHookBridge extends  IMTrackCommitHookBridge
     * fills up repo, files, log, commits by running log on the STDIN
     */
     
-    function __construct(MTrack_Repo $repo, $hooks
+    function __construct($repo
     {
-        $this->repo = $repo;
+        $this->repo = $repo->impl();
         while (($line = fgets(STDIN)) !== false) {
-          
+            echo "got: $line\n";
             list($old, $new, $ref) = explode(' ', trim($line), 3);
             $this->commits[] = $new;
   
-            $fp = $this->repo->git('log', '--no-color', '--name-status',
-                '--date=rfc', $ref, "$old..$new");
+            $fp = $this->repo->git(
+                'log', '--no-color', '--name-status',
+                '--date=rfc',  "$old..$new"); //$ref, used to be in here??  - but it breaks stuff...
                 
                 
             $props = array();
@@ -66,6 +67,7 @@ class MTrack_SCM_Git_CommitHookBridge extends  IMTrackCommitHookBridge
               
             } while (($line = fgets($fp)) !== false);
         }
+        print_r($this);exit;
     }