D10097: rhg: Fall back to Python for unsupported revset syntax

SimonSapin phabricator at mercurial-scm.org
Wed Mar 3 17:09:24 UTC 2021


SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10097

AFFECTED FILES
  rust/hg-core/src/revset.rs

CHANGE DETAILS

diff --git a/rust/hg-core/src/revset.rs b/rust/hg-core/src/revset.rs
--- a/rust/hg-core/src/revset.rs
+++ b/rust/hg-core/src/revset.rs
@@ -2,6 +2,7 @@
 //!
 //! <https://www.mercurial-scm.org/repo/hg/help/revsets>
 
+use crate::errors::HgError;
 use crate::repo::Repo;
 use crate::revlog::changelog::Changelog;
 use crate::revlog::revlog::{Revlog, RevlogError};
@@ -28,7 +29,10 @@
 
     // TODO: support for the rest of the language here.
 
-    Err(RevlogError::InvalidRevision)
+    Err(
+        HgError::unsupported(format!("cannot parse revset '{}'", input))
+            .into(),
+    )
 }
 
 /// Resolve the small subset of the language suitable for revlogs other than



To: SimonSapin, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list