{"record":{"id":"b6e8027e30651b43","repo":"phacility/phabricator","slug":"you-can-not-operate-on-all-files-with-all-and","errorCode":null,"errorMessage":"You can not operate on all files with \"--all\" and also operate on a subset of files by naming them explicitly or using constraint flags like \"--from-engine\".","messagePattern":"You can not operate on all files with \"--all\" and also operate on a subset of files by naming them explicitly or using constraint flags like \"--from-engine\"\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/files/management/PhabricatorFilesManagementWorkflow.php","lineNumber":42,"sourceCode":"  protected function buildIterator(PhutilArgumentParser $args) {\n    $viewer = $this->getViewer();\n\n    $is_all = $args->getArg('all');\n\n    $names = $args->getArg('names');\n    $from_engine = $args->getArg('from-engine');\n\n    $any_constraint = ($from_engine || $names);\n\n    if (!$is_all && !$any_constraint) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify which files to operate on, or use \"--all\" to operate on '.\n          'all files.'));\n    }\n\n    if ($is_all && $any_constraint) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'You can not operate on all files with \"--all\" and also operate '.\n          'on a subset of files by naming them explicitly or using '.\n          'constraint flags like \"--from-engine\".'));\n    }\n\n    // If we're migrating specific named files, convert the names into IDs\n    // first.\n    $ids = null;\n    if ($names) {\n      $files = $this->loadFilesWithNames($names);\n      $ids = mpull($files, 'getID');\n    }\n\n    $query = id(new PhabricatorFileQuery())\n      ->setViewer($viewer);\n\n    if ($ids) {","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/management/PhabricatorFilesManagementWorkflow.php#L24-L60","documentation":"Error \"You can not operate on all files with \"--all\" and also operate on a subset of files by naming them explicitly or using constraint flags like \"--from-engine\".\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/files/management/PhabricatorFilesManagementWorkflow.php:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}