->setDelimiter("\0");
}
+ public function getChangedFiles($since_commit) {
+ list($stdout) = $this->execxLocal(
+ 'diff --name-status -z %s',
+ $since_commit);
+ $return = array();
+ foreach (array_chunk(explode("\0", $stdout), 2) as $val) {
+ if (count($val) != 2) {
+ break;
+ }
+ list($status, $path) = $val;
+ $return[$path] = ($status == 'D' ? false : true);
+ }
+ return $return;
+ }
+
public function getBlame($path) {
// TODO: 'git blame' supports --porcelain and we should probably use it.
list($stdout) = $this->execxLocal(
return new LinesOfALargeExecFuture($future);
}
+ public function getChangedFiles($since_commit) {
+ list($stdout) = $this->execxLocal(
+ 'status --rev %s -0',
+ $since_commit);
+ $return = array();
+ foreach (explode("\0", $stdout) as $val) {
+ $match = null;
+ if (preg_match('/^(.) (.+)/', $val, $match)) {
+ list(, $status, $path) = $match;
+ $return[$path] = ($status == 'R' ? false : true);
+ }
+ }
+ return $return;
+ }
+
public function getBlame($path) {
list($stdout) = $this->execxLocal(
'annotate -u -v -c --rev %s -- %s',
throw new ArcanistCapabilityNotSupportedException($this);
}
+ public function getChangedFiles($since_commit) {
+ throw new ArcanistCapabilityNotSupportedException($this);
+ }
+
public function amendCommit($message) {
throw new ArcanistCapabilityNotSupportedException($this);
}
array($this, 'filterFiles'));
}
+ public function getChangedFiles($since_commit) {
+ // TODO: Handle paths with newlines.
+ list($stdout) = $this->execxLocal(
+ 'diff --revision %s:HEAD',
+ $since_commit);
+ $return = array();
+ foreach (explode("\n", $stdout) as $val) {
+ $match = null;
+ if (preg_match('/^(.)\S*\s+(.+)/', $val, $match)) {
+ list(, $status, $path) = $match;
+ $return[$path] = ($status == 'D' ? false : true);
+ }
+ }
+ return $return;
+ }
+
public function filterFiles($path) {
// NOTE: SVN uses '/' also on Windows.
if ($path == '' || substr($path, -1) == '/') {