mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-21 22:32:41 +01:00
Remove old Mercurial code testing for rebase and phase support
Summary: Ref T13546. The minimum required Mercurial version should now always have these features; if not, they should move to more modern feature tests. Test Plan: Grepped for affected symbols. Maniphest Tasks: T13546 Differential Revision: https://secure.phabricator.com/D21334
This commit is contained in:
parent
78e9cc9c01
commit
31d08f9a8f
1 changed files with 4 additions and 34 deletions
|
@ -9,9 +9,6 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
|
|||
private $localCommitInfo;
|
||||
private $rawDiffCache = array();
|
||||
|
||||
private $supportsRebase;
|
||||
private $supportsPhases;
|
||||
|
||||
private $featureResults = array();
|
||||
private $featureFutures = array();
|
||||
|
||||
|
@ -145,19 +142,10 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
|
|||
return $base;
|
||||
}
|
||||
|
||||
// Mercurial 2.1 and up have phases which indicate if something is
|
||||
// published or not. To find which revs are outgoing, it's much
|
||||
// faster to check the phase instead of actually checking the server.
|
||||
if ($this->supportsPhases()) {
|
||||
list($err, $stdout) = $this->execManualLocal(
|
||||
'log --branch %s -r %s --style default',
|
||||
$this->getBranchName(),
|
||||
'draft()');
|
||||
} else {
|
||||
list($err, $stdout) = $this->execManualLocal(
|
||||
'outgoing --branch %s --style default',
|
||||
$this->getBranchName());
|
||||
}
|
||||
list($err, $stdout) = $this->execManualLocal(
|
||||
'log --branch %s -r %s --style default',
|
||||
$this->getBranchName(),
|
||||
'draft()');
|
||||
|
||||
if (!$err) {
|
||||
$logs = ArcanistMercurialParser::parseMercurialLog($stdout);
|
||||
|
@ -508,24 +496,6 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
|
|||
}
|
||||
}
|
||||
|
||||
public function supportsRebase() {
|
||||
if ($this->supportsRebase === null) {
|
||||
list($err) = $this->execManualLocal('help rebase');
|
||||
$this->supportsRebase = $err === 0;
|
||||
}
|
||||
|
||||
return $this->supportsRebase;
|
||||
}
|
||||
|
||||
public function supportsPhases() {
|
||||
if ($this->supportsPhases === null) {
|
||||
list($err) = $this->execManualLocal('help phase');
|
||||
$this->supportsPhases = $err === 0;
|
||||
}
|
||||
|
||||
return $this->supportsPhases;
|
||||
}
|
||||
|
||||
public function supportsCommitRanges() {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue