/** * @inheritdoc */ public function generateTreeUrl(Revision $revision, $path = '') { if ($revision instanceof Tag or $revision instanceof Branch) { $rev = $revision->getName(); } else { $rev = $revision->getRevision(); } return $this->generator->generate($this->routeNames['tree'], array($this->routeArgs['tree_repository'] => $this->getName($revision->getRepository()), $this->routeArgs['tree_revision'] => $rev, $this->routeArgs['tree_path'] => $path)); }
/** * Returns all lines of the blame. * * @return array */ public function getLines() { if (null !== $this->lines) { return $this->lines; } $args = array('-p'); if (null !== $this->lineRange) { $args[] = '-L'; $args[] = $this->lineRange; } $args[] = $this->revision->getRevision(); $args[] = '--'; $args[] = $this->file; $parser = new BlameParser($this->repository); $parser->parse($this->repository->run('blame', $args)); $this->lines = $parser->lines; return $this->lines; }
public function generateTreeUrl(Revision $revision, $path = '') { return $this->generator->generate('tree', array('revision' => $revision->getRevision(), 'path' => $path, 'repository' => $this->getName($revision->getRepository()))); }