Summary:
We have a linter that needs to read data from the repo that isn't in the commit,
so that data isn't part of the svn transaction, thus not available in svnlook
cat --transaction. This change provides a method to get data from a committed
file.
Test Plan:
Successfully ran arc svn-hook-pre-commit with a linter that needs something
not in the transaction.
Reviewers: epriestley, jungejason, vrana
Reviewed By: epriestley
CC: aran, Koolvin
Differential Revision: https://secure.phabricator.com/D2582
*/
abstract class ArcanistHookAPI {
abstract public function getCurrentFileData($path);
+ abstract public function getUpstreamFileData($path);
}
return ($err? null : $file);
}
+
+ public function getUpstreamFileData($path) {
+ list($err, $file) = exec_manual(
+ 'svnlook cat %s %s',
+ $this->repository,
+ $this->root."/$path");
+ return ($err ? null : $file);
+ }
}