コード例 #1
0
 /**
  * Returns revision log for url.
  *
  * @param string $repository_url Repository url.
  *
  * @return RevisionLog
  */
 public function getRevisionLog($repository_url)
 {
     $bugtraq_logregex = $this->_repositoryConnector->withCache('1 year')->getProperty('bugtraq:logregex', $repository_url);
     $revision_log = new RevisionLog($repository_url, $this->_repositoryConnector, $this->_cacheManager, $this->_io);
     $revision_log->registerPlugin(new SummaryRevisionLogPlugin());
     $revision_log->registerPlugin(new PathsRevisionLogPlugin());
     $revision_log->registerPlugin(new BugsRevisionLogPlugin(new LogMessageParser($bugtraq_logregex)));
     $revision_log->registerPlugin(new MergesRevisionLogPlugin());
     $revision_log->refresh();
     return $revision_log;
 }
コード例 #2
0
 public function testGetCommandWithCaching()
 {
     $this->_expectCommand('svn --non-interactive info', 'OK');
     $this->_cacheManager->getCache('misc/command:svn --non-interactive info', null, 100)->willReturn(null)->shouldBeCalled();
     $this->_cacheManager->setCache('misc/command:svn --non-interactive info', 'OK', null, 100)->shouldBeCalled();
     $this->_repositoryConnector->withCache(100)->getCommand('info')->run();
 }
コード例 #3
0
 /**
  * Determines project bug tracking regular expression.
  *
  * @param string  $project_path    Project project_path.
  * @param integer $revision        Revision.
  * @param boolean $project_deleted Project is deleted.
  *
  * @return string
  */
 protected function detectProjectBugTraqRegEx($project_path, $revision, $project_deleted)
 {
     $ref_path = $this->getLastChangedRefPath($project_path);
     if (!isset($ref_path)) {
         return '';
     }
     return $this->_repositoryConnector->withCache('1 year')->getProperty('bugtraq:logregex', $this->_repositoryUrl . $ref_path . ($project_deleted ? '@' . $revision : ''));
 }