Returns the repository instance
public getRepository ( ) : TQ\Vcs\Repository\RepositoryInterface | ||
return | TQ\Vcs\Repository\RepositoryInterface |
/** * Returns the file stream to handle the requested path * * @param PathInformationInterface $path The path information * @param string $mode The mode used to open the path * @return FileBufferInterface The file buffer to handle the path */ public function createFileBuffer(PathInformationInterface $path, $mode) { $repo = $path->getRepository(); $buffer = $repo->showFile($path->getLocalPath(), $path->getRef()); $objectInfo = $repo->getObjectInfo($path->getLocalPath(), $path->getRef()); return new StringBuffer($buffer, $objectInfo, 'r'); }
/** * streamWrapper::stream_close — Close an resource */ public function stream_close() { $this->fileBuffer->close(); $this->fileBuffer = null; $repo = $this->path->getRepository(); if ($repo->isDirty()) { $repo->add(array($this->path->getFullPath())); $commitMsg = $this->getContextOption('commitMsg', null); $author = $this->getContextOption('author', null); $repo->commit($commitMsg, array($this->path->getFullPath()), $author); } $this->path = null; }
/** * Returns the file stream to handle the requested path * * @param PathInformationInterface $path The path information * @param string $mode The mode used to open the path * @return FileBufferInterface The file buffer to handle the path */ public function createFileBuffer(PathInformationInterface $path, $mode) { return new StringBuffer($this->createLogString($path->getRepository(), $path->getArgument('limit'), $path->getArgument('skip')), array(), 'r'); }
/** * Returns the file stream to handle the requested path * * @param PathInformationInterface $path The path information * @param string $mode The mode used to open the path * @return FileBufferInterface The file buffer to handle the path */ public function createFileBuffer(PathInformationInterface $path, $mode) { $repo = $path->getRepository(); $buffer = $repo->showCommit($path->getArgument('ref')); return new StringBuffer($buffer, array(), 'r'); }