{"record":{"id":"6a4a7febb56f25d6","repo":"phacility/phabricator","slug":"specify-which-steps-to-reparse-with-message","errorCode":null,"errorMessage":"Specify which steps to reparse with \"--message\", \"--change\", and/or \"--publish\"; or \"--importing\" to run all missing steps.","messagePattern":"Specify which steps to reparse with \"--message\", \"--change\", and/or \"--publish\"; or \"--importing\" to run all missing steps\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php","lineNumber":122,"sourceCode":"          \"All from repo: %s\\n\".\n          \"Commit(s) to reparse: %s\",\n          $all_from_repo,\n          $commits));\n    }\n\n    $any_step = ($reparse_message || $reparse_change || $reparse_publish);\n\n    if ($any_step && $importing) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Choosing steps with \"--importing\" conflicts with flags which '.\n          'select specific steps.'));\n    } else if ($any_step) {\n      // OK.\n    } else if ($importing) {\n      // OK.\n    } else if (!$any_step && !$importing) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify which steps to reparse with \"--message\", \"--change\", '.\n          'and/or \"--publish\"; or \"--importing\" to run all missing steps.'));\n    }\n\n    $min_timestamp = false;\n    if ($min_date) {\n      $min_timestamp = strtotime($min_date);\n\n      if (!$all_from_repo) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'You must use \"--all\" if you specify \"--min-date\".'));\n      }\n\n      // previous to PHP 5.1.0 you would compare with -1, instead of false\n      if (false === $min_timestamp) {\n        throw new PhutilArgumentUsageException(","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php#L104-L140","documentation":"reparse must be told which parsing steps to run: at least one of `--message`, `--change`, `--publish`, or `--importing` (run all steps still missing). A subject alone (commit or `--all`) with no step selection is a no-op, so the workflow exits with this PhutilArgumentUsageException.","triggerScenarios":"Running `./bin/repository reparse --all R` or `./bin/repository reparse <commit>` with no step flags at all (`$any_step` and `$importing` both false).","commonSituations":"First-time use assuming reparse does 'everything' by default; long command lines where the trailing step flag was accidentally dropped.","solutions":["Add the step(s): `--message` to reparse commit messages, `--change` for change detection, `--publish` for publishing, or `--importing` to run every incomplete step.","Use `./bin/repository reparse --help` to confirm flag names before running."],"exampleFix":"# before\n./bin/repository reparse --all R\n# Usage exception: Specify which steps to reparse with \"--message\", \"--change\", and/or \"--publish\"...\n\n# after\n./bin/repository reparse --all R --message --change\n# or complete unfinished import steps\n./bin/repository reparse --all R --importing","handlingStrategy":"validation","validationCode":"# Require at least one step selector\n[ \"$MSG\" = 1 ] || [ \"$CHANGE\" = 1 ] || [ \"$PUBLISH\" = 1 ] || [ \"$IMPORTING\" = 1 ] || {\n  echo \"reparse needs --message/--change/--publish or --importing\" >&2; exit 2;\n}\n./bin/repository reparse --all \"$REPO\" ${MSG:+--message} ${CHANGE:+--change} ${PUBLISH:+--publish} ${IMPORTING:+--importing}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make step flags required fields in reparse automation rather than optional defaults.","Use `--importing` for finishing partially imported repositories; use explicit steps for re-doing specific work."],"tags":["php","phabricator","cli","reparse","usage-error"],"backgroundTag":"missing-required-flag","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}