phacility/phabricator · warning · PhutilArgumentUsageException
Choosing steps with "--importing" conflicts with flags which
Error message
Choosing steps with "--importing" conflicts with flags which select specific steps.
What it means
reparse offers two ways to choose what runs: explicit step flags (`--message`, `--change`, `--publish`) or `--importing`, which runs every step a commit has not completed yet. Combining `--importing` with specific step flags is contradictory — the 'missing steps' set cannot be narrowed to hand-picked steps — so the combination is rejected with this PhutilArgumentUsageException.
Source
Thrown at src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php:113
throw new PhutilArgumentUsageException(
pht('Specify a commit or repository to reparse.'));
}
if ($all_from_repo && $reparse_what) {
$commits = implode(', ', $reparse_what);
throw new PhutilArgumentUsageException(
pht(
"Specify a commit or repository to reparse, not both:\n".
"All from repo: %s\n".
"Commit(s) to reparse: %s",
$all_from_repo,
$commits));
}
$any_step = ($reparse_message || $reparse_change || $reparse_publish);
if ($any_step && $importing) {
throw new PhutilArgumentUsageException(
pht(
'Choosing steps with "--importing" conflicts with flags which '.
'select specific steps.'));
} else if ($any_step) {
// OK.
} else if ($importing) {
// OK.
} else if (!$any_step && !$importing) {
throw new PhutilArgumentUsageException(
pht(
'Specify which steps to reparse with "--message", "--change", '.
'and/or "--publish"; or "--importing" to run all missing steps.'));
}
$min_timestamp = false;
if ($min_date) {
$min_timestamp = strtotime($min_date);
View on GitHub (pinned to 5720a38cfe)
Solutions
- For targeted work, drop `--importing` and keep the specific step flags (`--message`, `--change`, `--publish`, combinable).
- For catch-up work on partially imported commits, drop the step flags and keep only `--importing`.
Example fix
# before ./bin/repository reparse --all R --importing --message # Usage exception: Choosing steps with "--importing" conflicts with flags which select specific steps. # after: run all missing steps ./bin/repository reparse --all R --importing # or run one specific step everywhere ./bin/repository reparse --all R --message
Defensive patterns
Strategy: validation
Validate before calling
# Reject --importing combined with step flags before invoking
if [ "$IMPORTING" = 1 ] && { [ "$MSG" = 1 ] || [ "$CHANGE" = 1 ] || [ "$PUBLISH" = 1 ]; }; then
echo "--importing cannot be combined with --message/--change/--publish" >&2; exit 2
fi
./bin/repository reparse --all "$REPO" ${MSG:+--message} ${CHANGE:+--change} ${PUBLISH:+--publish} ${IMPORTING:+--importing} Prevention
- Document the two modes (catch-up vs targeted) prominently in internal runbooks.
- Have scripts select one mode explicitly and refuse mixed configurations.
When it happens
Trigger: Running `./bin/repository reparse --all R --importing --message` or any invocation where `$any_step` (message/change/publish) is truthy together with `--importing`.
Common situations: Operators adding `--importing` to an existing step-specific command hoping to 'fill in the rest'; copied command lines from runbooks that mixed guidance from both modes.
Related errors
- Specify a commit or repository to reparse, not both: All fro
- You must use "--all" if you specify "--min-date".
- Flags "--all-repositories" and "--repository" are not compat
- Flags "--all-identities" and "--raw" are not compatible.
- Specify a commit or repository to reparse.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/1e01f5dfe95a420c.
Report an issue: GitHub.