mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-01-11 07:11:03 +01:00
Provide a method for getting Git SVN revision
Summary: I plan to use it in `save_lint.php`. Test Plan: $api->getUnderlyingWorkingCopyRevision(); // In Git SVN repo Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4054
This commit is contained in:
parent
c12dee997d
commit
9917c1f06a
2 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue