Ejemplo n.º 1
0
 /**
  * List repository content at a given revision
  *
  * @access public
  * @author Cédric Alfonsi, <*****@*****.**>
  * @param  Repository vcs
  * @param  string path
  * @param  int revision
  * @return array
  */
 public function listContent(core_kernel_versioning_Repository $vcs, $path, $revision = null)
 {
     $returnValue = array();
     $startTime = helpers_Time::getMicroTime();
     if ($vcs->authenticate()) {
         $svnList = svn_ls($path, $revision);
         foreach ($svnList as $svnEntry) {
             $returnValue[] = array('name' => $svnEntry['name'], 'type' => $svnEntry['type'], 'revision' => $svnEntry['created_rev'], 'author' => $svnEntry['last_author'], 'time' => $svnEntry['time_t']);
         }
     }
     $endTime = helpers_Time::getMicroTime();
     common_Logger::i("svn_listContent (" . $path . ') -> ' . ($endTime - $startTime) . 's');
     return (array) $returnValue;
 }