mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 23:02:41 +01:00
Don't check working copy status for "arc commit --show"
Summary: We do unnecessary working copy checks under "--show", even though the working copy isn't relevant. Also, 'sourcePath' may not be set (e.g., "arc commit --show --revision X" where X is some "--only" revision). Test Plan: Ran "arc commit --show --revision 1" against some test data, got clean output. Reviewers: vrana, btrahan, jungejason Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D2353
This commit is contained in:
parent
c0c3c8a113
commit
47ed2aca95
1 changed files with 8 additions and 4 deletions
|
@ -122,7 +122,11 @@ EOTEXT
|
||||||
$this->revisionID = $revision['id'];
|
$this->revisionID = $revision['id'];
|
||||||
$revision_id = $revision['id'];
|
$revision_id = $revision['id'];
|
||||||
|
|
||||||
|
$is_show = $this->getArgument('show');
|
||||||
|
|
||||||
|
if (!$is_show) {
|
||||||
$this->runSanityChecks($revision);
|
$this->runSanityChecks($revision);
|
||||||
|
}
|
||||||
|
|
||||||
$message = $this->getConduit()->callMethodSynchronous(
|
$message = $this->getConduit()->callMethodSynchronous(
|
||||||
'differential.getcommitmessage',
|
'differential.getcommitmessage',
|
||||||
|
@ -142,8 +146,8 @@ EOTEXT
|
||||||
|
|
||||||
$message = $event->getValue('message');
|
$message = $event->getValue('message');
|
||||||
|
|
||||||
if ($this->getArgument('show')) {
|
if ($is_show) {
|
||||||
echo $message;
|
echo $message."\n";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,7 +332,7 @@ EOTEXT
|
||||||
"Commit this revision anyway?";
|
"Commit this revision anyway?";
|
||||||
}
|
}
|
||||||
|
|
||||||
$revision_source = $revision['sourcePath'];
|
$revision_source = idx($revision, 'sourcePath');
|
||||||
$current_source = $repository_api->getPath();
|
$current_source = $repository_api->getPath();
|
||||||
if ($revision_source != $current_source) {
|
if ($revision_source != $current_source) {
|
||||||
$confirm[] =
|
$confirm[] =
|
||||||
|
|
Loading…
Reference in a new issue