{"record":{"id":"ef53629b01c5f190","repo":"phacility/phabricator","slug":"specify-one-or-more-repositories-to-find-importing","errorCode":null,"errorMessage":"Specify one or more repositories to find importing commits for.","messagePattern":"Specify one or more repositories to find importing commits for\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementImportingWorkflow.php","lineNumber":30,"sourceCode":"          'Show commits in __repository__ which are still importing.'))\n      ->setArguments(\n        array(\n          array(\n            'name'        => 'simple',\n            'help'        => pht('Show simpler output.'),\n          ),\n          array(\n            'name'        => 'repos',\n            'wildcard'    => true,\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $repos = $this->loadRepositories($args, 'repos');\n\n    if (!$repos) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify one or more repositories to find importing commits for.'));\n    }\n\n    $repos = mpull($repos, null, 'getID');\n\n    $table = new PhabricatorRepositoryCommit();\n    $conn_r = $table->establishConnection('r');\n\n    $rows = queryfx_all(\n      $conn_r,\n      'SELECT repositoryID, commitIdentifier, importStatus FROM %T\n        WHERE repositoryID IN (%Ld)\n          AND (importStatus & %d) != %d\n          AND (importStatus & %d) != %d',\n      $table->getTableName(),\n      array_keys($repos),\n      PhabricatorRepositoryCommit::IMPORTED_ALL,","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementImportingWorkflow.php#L12-L48","documentation":"Usage error from `bin/repository importing`: the workflow's `repos` wildcard argument captured no repositories, because none were passed on the command line (or none resolved). It lists commits stuck in IMPORTING state via a direct query on `repository_commit`, and needs at least one repository scope to run.","triggerScenarios":"Running `./bin/repository importing` with no arguments; passing only flags; passing identifiers that fail to resolve so `loadRepositories()` returns an empty list.","commonSituations":"Operators expect the tool to scan all repositories and run it bare; copy-pasted command lost the trailing repo arguments.","solutions":["Pass one or more repository callsigns/IDs: `./bin/repository importing R1 R2`.","To check every repository, enumerate them first (`./bin/repository list`) and pass the full list.","Verify the callsigns resolve in Diffusion if the list still comes back empty."],"exampleFix":"// before\n$ ./bin/repository importing\n[1165] Specify one or more repositories to find importing commits for.\n\n// after\n$ ./bin/repository importing R1 R2","handlingStrategy":"validation","validationCode":"REPOS=\"$(./bin/repository list | awk '{print $1}' | tr '\\n' ' ')\"\n[ -n \"${REPOS// /}\" ] && ./bin/repository importing $REPOS","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat repository arguments as mandatory in wrapper scripts: `[ $# -ge 1 ] || usage`.","Prefer iterating repositories explicitly over running the command bare.","Check the workflow's usage with `./bin/repository help importing` when in doubt."],"tags":["phabricator","phorge","cli","usage-error","missing-argument"],"backgroundTag":"missing-required-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}