mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-02-09 05:18:29 +01:00
Use .^ instead of HEAD^ for mercurial
Summary: ##arc amend## in a mercurial repo was failing with this message Usage Exception: Commit 'HEAD^' is not a valid Mercurial commit identifier. mercurial's .^ is about the same thing as git's HEAD^ Test Plan: ##arc amend## in a mercurial repo with ##"immutable_history" : "false"## in the ##.arcconfig##. Reviewers: epriestley Reviewed By: epriestley CC: vrana, aran, Korvin Differential Revision: https://secure.phabricator.com/D2690
This commit is contained in:
parent
08b53c3803
commit
bcbe1737b8
1 changed files with 5 additions and 1 deletions
|
@ -102,7 +102,11 @@ EOTEXT
|
||||||
$revision_id = $this->normalizeRevisionID($this->getArgument('revision'));
|
$revision_id = $this->normalizeRevisionID($this->getArgument('revision'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($repository_api instanceof ArcanistGitAPI) {
|
||||||
$repository_api->setRelativeCommit('HEAD^');
|
$repository_api->setRelativeCommit('HEAD^');
|
||||||
|
} else if ($repository_api instanceof ArcanistMercurialAPI) {
|
||||||
|
$repository_api->setRelativeCommit('.^');
|
||||||
|
}
|
||||||
|
|
||||||
$in_working_copy = $repository_api->loadWorkingCopyDifferentialRevisions(
|
$in_working_copy = $repository_api->loadWorkingCopyDifferentialRevisions(
|
||||||
$this->getConduit(),
|
$this->getConduit(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue