public function testParseFileGitFileNotFound() { $this->setExpectedException('RuntimeException', 'File "' . __DIR__ . '/Parse/Git/data/diff_wibble' . '" not found.'); $filename = __DIR__ . '/Parse/Git/data/diff_wibble'; $parser = new Parser(); $parser->parseFile($filename, Parser::VCS_GIT); }
/** * Get a changeset for the specified revision * * @param RevisionLogInterface $revisionLog * * @return RevisionInterface */ public function getRevision(RevisionLogInterface $revisionLog) { $result = $this->executor->execute(array('diff', '-c', $revisionLog->getIdentifier())); $parser = new Parser(); $changeset = $parser->parseLines($result->getStdOutLines(), Parser::VCS_SVN); return new Revision($revisionLog, $changeset); }
/** * Get a changeset for the specified revision * * @param RevisionLogInterface $revisionLog * * @return RevisionInterface */ public function getRevision(RevisionLogInterface $revisionLog) { $result = $this->executor->execute(array('format-patch', '-1', '--stdout', $revisionLog->getIdentifier())); $parser = new Parser(); $changeset = $parser->parseLines($result->getStdOutLines(), Parser::VCS_GIT); return new Revision($revisionLog, $changeset); }