return $files;
}
+ public function getAllFiles() {
+ $future = $this->buildLocalFuture(array('ls-files -z'));
+ return id(new LinesOfALargeExecFuture($future))
+ ->setDelimiter("\0");
+ }
+
public function getBlame($path) {
// TODO: 'git blame' supports --porcelain and we should probably use it.
list($stdout) = $this->execxLocal(
return $this->localCommitInfo;
}
+ public function getAllFiles() {
+ // TODO: Handle paths with newlines.
+ $future = $this->buildLocalFuture(array('manifest'));
+ return new LinesOfALargeExecFuture($future);
+ }
+
public function getBlame($path) {
list($stdout) = $this->execxLocal(
'annotate -u -v -c --rev %s -- %s',
}
}
+ /**
+ * @return Traversable
+ */
+ abstract public function getAllFiles();
+
abstract public function getBlame($path);
abstract public function getWorkingCopyStatus();
abstract public function getRawDiffText($path);
EODIFF;
}
+ public function getAllFiles() {
+ // TODO: Handle paths with newlines.
+ $future = $this->buildLocalFuture(array('list -R'));
+ return new PhutilCallbackFilterIterator(
+ new LinesOfALargeExecFuture($future),
+ array($this, 'filterFiles'));
+ }
+
+ public function filterFiles($path) {
+ // NOTE: SVN uses '/' also on Windows.
+ if ($path == '' || substr($path, -1) == '/') {
+ return null;
+ }
+ return $path;
+ }
+
public function getBlame($path) {
$blame = array();