diff --git a/src/repository/hookapi/base/ArcanistHookAPI.php b/src/repository/hookapi/base/ArcanistHookAPI.php index e79e5e0c..3696dc66 100644 --- a/src/repository/hookapi/base/ArcanistHookAPI.php +++ b/src/repository/hookapi/base/ArcanistHookAPI.php @@ -21,4 +21,5 @@ */ abstract class ArcanistHookAPI { abstract public function getCurrentFileData($path); + abstract public function getUpstreamFileData($path); } diff --git a/src/repository/hookapi/subversion/ArcanistSubversionHookAPI.php b/src/repository/hookapi/subversion/ArcanistSubversionHookAPI.php index ca0255c4..da5d337f 100644 --- a/src/repository/hookapi/subversion/ArcanistSubversionHookAPI.php +++ b/src/repository/hookapi/subversion/ArcanistSubversionHookAPI.php @@ -40,4 +40,12 @@ final class ArcanistSubversionHookAPI extends ArcanistHookAPI { 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); + } }