MTrack/SCM/Git/WorkingCopy.php
authorAlan Knowles <alan@akbkhome.com>
Tue, 6 Sep 2011 08:37:49 +0000 (16:37 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 6 Sep 2011 08:37:49 +0000 (16:37 +0800)
MTrack/SCM/Git/WorkingCopy.php

index 86d117b..f24275f 100644 (file)
@@ -1,6 +1,20 @@
 <?php
 
-
+/***
+ *
+ * working directories?
+ *
+ * This is very dodgy..
+ * = either we have a temporary working directory created for each session/user etc..
+ *
+ * = what happens when multiple people try to access a working directory..
+ *
+ * = what happens if the same person is doing multiple things on the same workign directory..
+ *
+ * 
+ *
+ *
+ */
 
 class MTrack_SCM_Git_WorkingCopy extends MTrackSCMWorkingCopy
 {
@@ -8,11 +22,9 @@ class MTrack_SCM_Git_WorkingCopy extends MTrackSCMWorkingCopy
     public $push = true;
   
     function __construct(MTrack_Repo $repo) {
-        $cfg = HTML_FlexyFramework::get()->MTrack;
-        if (empty($cfg['workingdir'])) {
-            throw new Exception("MTrack[workingdir] is not set");
-        }
-        $this->dir = $cfg['workingdir'] .'/working.' . $this->repo->shortname;
+        
+        $this->dir = $this->generateTempDir();;
+        
         $this->repo = $repo;
         
         MTrackSCM::run('git', 'string',