{"record":{"id":"b145e19c04cd2d7f","repo":"phacility/phabricator","slug":"specify-one-or-more-repositories-to-act-on","errorCode":null,"errorMessage":"Specify one or more repositories to act on.","messagePattern":"Specify one or more repositories to act on\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementMaintenanceWorkflow.php","lineNumber":40,"sourceCode":"          array(\n            'name' => 'stop',\n            'help' => pht(\n              'Take repositories out of maintenance mode, returning them '.\n              'to normal serice.'),\n          ),\n          array(\n            'name' => 'repositories',\n            'wildcard' => true,\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $viewer = $this->getViewer();\n\n    $repositories = $this->loadRepositories($args, 'repositories');\n    if (!$repositories) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify one or more repositories to act on.'));\n    }\n\n    $message = $args->getArg('start');\n    $is_start = (bool)strlen($message);\n    $is_stop = $args->getArg('stop');\n\n    if (!$is_start && !$is_stop) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Use \"--start <message>\" to put repositories into maintenance '.\n          'mode, or \"--stop\" to take them out of maintenance mode.'));\n    }\n\n    if ($is_start && $is_stop) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify either \"--start\" or \"--stop\", but not both.'));","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementMaintenanceWorkflow.php#L22-L58","documentation":"Usage error from `bin/repository maintenance`: the `repositories` wildcard argument resolved to an empty list. The workflow writes a maintenance-mode message into repository configuration (new content source, applied per repository), so it requires at least one explicit target.","triggerScenarios":"Running `./bin/repository maintenance --start \"message\"` without repository arguments; passing only the `--start`/`--stop` flags; identifiers that resolve to nothing.","commonSituations":"Operators assume maintenance mode is global and omit the repo list; the callsign portion of a copy-pasted command is dropped.","solutions":["Include repository callsigns/IDs: `./bin/repository maintenance R1 R2 --start \"upgrading disk\"`.","For all repositories, enumerate with `./bin/repository list` and pass the whole list.","Check the callsigns exist if arguments appear to be ignored."],"exampleFix":"// before\n$ ./bin/repository maintenance --start \"disk upgrade\"\n[1170] Specify one or more repositories to act on.\n\n// after\n$ ./bin/repository maintenance R1 R2 --start \"disk upgrade\"","handlingStrategy":"validation","validationCode":"repos=(\"$@\")\n[ ${#repos[@]} -ge 1 ] || { echo 'usage: maintenance <callsign>... (--start <msg> | --stop)' >&2; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make repository arguments mandatory in wrapper scripts.","Note maintenance mode is per-repository, not install-wide."],"tags":["phabricator","phorge","cli","usage-error","missing-argument","maintenance-mode"],"backgroundTag":"missing-required-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}