Page MenuHomePhabricator

D11643.id28022.diff
No OneTemporary

D11643.id28022.diff

diff --git a/scripts/arcanist.php b/scripts/arcanist.php
--- a/scripts/arcanist.php
+++ b/scripts/arcanist.php
@@ -203,13 +203,24 @@
}
$supported_vcs_types = $workflow->getSupportedRevisionControlSystems();
- if (!in_array($working_copy->getVCSType(), $supported_vcs_types)) {
- throw new ArcanistUsageException(
- pht(
- '`%s %s` is only supported under %s.',
- 'arc',
- $workflow->getWorkflowName(),
- implode(', ', $supported_vcs_types)));
+ $vcs_type = $working_copy->getVCSType();
+ if (!in_array($vcs_type, $supported_vcs_types)) {
+ if ($vcs_type === null) {
+ throw new ArcanistUsageException(
+ pht(
+ '`%s %s` must be run in a working copy of a repository. This '.
+ 'command supports: %s.',
+ 'arc',
+ $workflow->getWorkflowName(),
+ implode(', ', $supported_vcs_types)));
+ } else {
+ throw new ArcanistUsageException(
+ pht(
+ '`%s %s` is only supported under %s.',
+ 'arc',
+ $workflow->getWorkflowName(),
+ implode(', ', $supported_vcs_types)));
+ }
}
$need_working_copy = $workflow->requiresWorkingCopy();
diff --git a/src/workflow/ArcanistWorkflow.php b/src/workflow/ArcanistWorkflow.php
--- a/src/workflow/ArcanistWorkflow.php
+++ b/src/workflow/ArcanistWorkflow.php
@@ -1216,7 +1216,7 @@
}
public function getSupportedRevisionControlSystems() {
- return array('git', 'hg', 'svn');
+ return array(null, 'git', 'hg', 'svn');
}
final protected function getPassthruArgumentsAsMap($command) {

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 28, 7:21 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7725642
Default Alt Text
D11643.id28022.diff (1 KB)

Event Timeline