mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-12 18:02:39 +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 $localCommitInfo;
|
||||||
private $rawDiffCache = array();
|
private $rawDiffCache = array();
|
||||||
|
|
||||||
private $supportsRebase;
|
|
||||||
private $supportsPhases;
|
|
||||||
|
|
||||||
private $featureResults = array();
|
private $featureResults = array();
|
||||||
private $featureFutures = array();
|
private $featureFutures = array();
|
||||||
|
|
||||||
|
@ -145,19 +142,10 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
|
||||||
return $base;
|
return $base;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mercurial 2.1 and up have phases which indicate if something is
|
list($err, $stdout) = $this->execManualLocal(
|
||||||
// published or not. To find which revs are outgoing, it's much
|
'log --branch %s -r %s --style default',
|
||||||
// faster to check the phase instead of actually checking the server.
|
$this->getBranchName(),
|
||||||
if ($this->supportsPhases()) {
|
'draft()');
|
||||||
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());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$err) {
|
if (!$err) {
|
||||||
$logs = ArcanistMercurialParser::parseMercurialLog($stdout);
|
$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() {
|
public function supportsCommitRanges() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue