diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php index b7a045cb..8e3b8065 100644 --- a/src/repository/api/ArcanistGitAPI.php +++ b/src/repository/api/ArcanistGitAPI.php @@ -702,6 +702,14 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI { return rtrim($stdout, "\n"); } + public function getUnderlyingWorkingCopyRevision() { + list($err, $stdout) = $this->execManualLocal('svn find-rev HEAD'); + if (!$err && $stdout) { + return rtrim($stdout, "\n"); + } + return $this->getWorkingCopyRevision(); + } + public function isHistoryDefaultImmutable() { return false; } diff --git a/src/repository/api/ArcanistRepositoryAPI.php b/src/repository/api/ArcanistRepositoryAPI.php index 82f9fdcb..0e4334e5 100644 --- a/src/repository/api/ArcanistRepositoryAPI.php +++ b/src/repository/api/ArcanistRepositoryAPI.php @@ -173,6 +173,10 @@ abstract class ArcanistRepositoryAPI { ConduitClient $conduit, array $query); + public function getUnderlyingWorkingCopyRevision() { + return $this->getWorkingCopyRevision(); + } + /** * Set the base commit to a reasonable default value so that working copy * status checks can do something meaningful and won't invoke configured