$a)); } return $ret; } function __construct($ar = null) { if (!is_array($ar)) { return; // can accept empty ctrs } foreach($ar as $k=>$v) { $this->$k = $v; } } function reconcileRepoSettings(MTrackSCM $r) { $c = self::Factory(array('scmtype'=>$this->scmtype)); $s->reconcileRepoSettings($this); } function getServerURL() { if ($this->serverurl) { return $this->serverurl; } /* $url = MTrackConfig::get('repos', "$this->scmtype.serverurl"); if ($url) { return $url . $this->getBrowseRootName(); } */ return null; } function getCheckoutCommand() { $url = $this->getServerURL(); if (strlen($url)) { return $this->scmtype . ' clone ' . $this->getServerURL(); } return null; } function canFork() { return false; } function getWorkingCopy() { throw new Exception("cannot getWorkingCopy from a generic repo object"); } /* function deleteRepo(MTrackChangeset $CS) { MTrackDB::q('delete from repos where repoid = ?', $this->repoid); mtrack_rmdir($this->repopath); } */ /** * i could not find where this is used.. function getLinks() { if ($this->links === null) { $this->links = array(); foreach (MTrackDB::q('select linkid, projid, repopathregex from project_repo_link where repoid = ? order by repopathregex', $this->repoid)->fetchAll() as $row) { $this->links[$row[0]] = array($row[1], $row[2]); } } return $this->links; } function addLink($proj, $regex) { if ($proj instanceof MTrackProject) { $this->links_to_add[] = array($proj->projid, $regex); } else { $this->links_to_add[] = array($proj, $regex); } } function removeLink($linkid) { $this->links_to_remove[$linkid] = $linkid; } */ // these are needed just to implement the abstract interface.. function getBranches() {} function getTags() {} function readdir($path, $object = null, $ident = null) {} function file($path, $object = null, $ident = null) {} function history($path, $limit = null, $object = null, $ident = null){} function diff($path, $from = null, $to = null) {} function getRelatedChanges($revision) {} function getSCMMetaData() { return null; } /** * converts a commit log message (cached locally into a working object..) * see Browse.php */ function commitLogToEvent($str) { throw new Exception("no implementation for commitLogToEvent"); } }