{"record":{"id":"6e17b4e23a31bbc4","repo":"phacility/phabricator","slug":"subversion-does-not-support-searching-for-ancestor","errorCode":null,"errorMessage":"Subversion does not support searching for ancestors of a particular ref. This operation is not meaningful in Subversion.","messagePattern":"Subversion does not support searching for ancestors of a particular ref\\. This operation is not meaningful in Subversion\\.","errorType":"validation","errorClass":"PhabricatorSearchConstraintException","httpStatus":null,"severity":"warning","filePath":"src/applications/diffusion/query/DiffusionCommitQuery.php","lineNumber":575,"sourceCode":"            'To search for commits which are ancestors of particular refs, '.\n            'you must constrain the search to exactly one repository.'));\n      }\n\n      $repository_id = head($this->repositoryIDs);\n      $history_limit = $this->getRawResultLimit() * 32;\n      $viewer = $this->getViewer();\n\n      $repository = id(new PhabricatorRepositoryQuery())\n        ->setViewer($viewer)\n        ->withIDs(array($repository_id))\n        ->executeOne();\n\n      if (!$repository) {\n        throw new PhabricatorEmptyQueryException();\n      }\n\n      if ($repository->isSVN()) {\n        throw new PhabricatorSearchConstraintException(\n          pht(\n            'Subversion does not support searching for ancestors of '.\n            'a particular ref. This operation is not meaningful in '.\n            'Subversion.'));\n      }\n\n      if ($repository->isHg()) {\n        throw new PhabricatorSearchConstraintException(\n          pht(\n            'Mercurial does not currently support searching for ancestors of '.\n            'a particular ref.'));\n      }\n\n      $can_constrain = true;\n      $history_identifiers = array();\n      foreach ($this->ancestorsOf as $key => $ref) {\n        try {\n          $raw_history = DiffusionQuery::callConduitWithDiffusionRequest(","sourceCodeStart":557,"sourceCodeEnd":593,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/query/DiffusionCommitQuery.php#L557-L593","documentation":"The ancestors-of-refs search relies on a DAG-shaped history (git-style branch graphs). Subversion's model is a single linear rN sequence with no ref DAG, so the operation is not meaningful there; Phabricator raises PhabricatorSearchConstraintException to block the combination instead of pretending to answer.","triggerScenarios":"A commit search includes ancestorsOf and is constrained to exactly one repository, but that repository is a Subversion repository.","commonSituations":"Generic saved queries, dashboards, or API code written against git repositories reused unchanged on SVN repositories.","solutions":["Remove the ancestors-of-refs constraint when searching SVN repositories","Express 'history reachable from a revision' in SVN terms instead: filter by path and revision range","Guard shared query code so the ancestor filter is only applied for git repositories"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if ($repository->isSVN()) {\n  // hide or reject the ancestors-of filter for this repository\n}","typeGuard":"function supportsAncestorSearch(PhabricatorRepository $repository) {\n  return !$repository->isSVN();\n}","tryCatchPattern":"try {\n  $results = $query->execute();\n} catch (PhabricatorSearchConstraintException $ex) {\n  // explain that SVN has no ref DAG; suggest path + revision filters\n}","preventionTips":["Branch shared dashboard/query code on the repository VCS before applying ancestor filters","Document per-VCS search capability differences for users of generic queries"],"tags":["subversion","search","unsupported-operation","phabricator"],"backgroundTag":"unsupported-vcs-operation","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}