mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 08:52:39 +01:00
Support "D123", not just "123", for "arc export --revision"
Summary: We currently error if a user types "--revision D123". Test Plan: `arc export --git --revision D123`, got a diff. Reviewers: vrana, jungejason Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D2880
This commit is contained in:
parent
98b3dfda3b
commit
9c33c7330c
1 changed files with 6 additions and 2 deletions
|
@ -103,11 +103,17 @@ EOTEXT
|
||||||
if ($this->getArgument('revision')) {
|
if ($this->getArgument('revision')) {
|
||||||
$source = self::SOURCE_REVISION;
|
$source = self::SOURCE_REVISION;
|
||||||
$requested++;
|
$requested++;
|
||||||
|
|
||||||
|
$source_id = $this->getArgument($source);
|
||||||
|
$this->sourceID = $this->normalizeRevisionID($source_id);
|
||||||
}
|
}
|
||||||
if ($this->getArgument('diff')) {
|
if ($this->getArgument('diff')) {
|
||||||
$source = self::SOURCE_DIFF;
|
$source = self::SOURCE_DIFF;
|
||||||
$requested++;
|
$requested++;
|
||||||
|
|
||||||
|
$this->sourceID = $this->getArgument($source);
|
||||||
}
|
}
|
||||||
|
$this->source = $source;
|
||||||
|
|
||||||
if ($requested > 1) {
|
if ($requested > 1) {
|
||||||
throw new ArcanistUsageException(
|
throw new ArcanistUsageException(
|
||||||
|
@ -115,8 +121,6 @@ EOTEXT
|
||||||
"one change source.");
|
"one change source.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->source = $source;
|
|
||||||
$this->sourceID = $this->getArgument($source);
|
|
||||||
|
|
||||||
$format = null;
|
$format = null;
|
||||||
$requested = 0;
|
$requested = 0;
|
||||||
|
|
Loading…
Reference in a new issue