rust/hg-core/src/revset.rs
changeset 46725 df247f58ecee
parent 46433 4b381dbbf8b7
child 46821 e8ae91b1a63d
equal deleted inserted replaced
46724:78e6700ab009 46725:df247f58ecee
     1 //! The revset query language
     1 //! The revset query language
     2 //!
     2 //!
     3 //! <https://www.mercurial-scm.org/repo/hg/help/revsets>
     3 //! <https://www.mercurial-scm.org/repo/hg/help/revsets>
     4 
     4 
       
     5 use crate::errors::HgError;
     5 use crate::repo::Repo;
     6 use crate::repo::Repo;
     6 use crate::revlog::changelog::Changelog;
     7 use crate::revlog::changelog::Changelog;
     7 use crate::revlog::revlog::{Revlog, RevlogError};
     8 use crate::revlog::revlog::{Revlog, RevlogError};
     8 use crate::revlog::NodePrefix;
     9 use crate::revlog::NodePrefix;
     9 use crate::revlog::{Revision, NULL_REVISION};
    10 use crate::revlog::{Revision, NULL_REVISION};
    26         return Ok(NULL_REVISION);
    27         return Ok(NULL_REVISION);
    27     }
    28     }
    28 
    29 
    29     // TODO: support for the rest of the language here.
    30     // TODO: support for the rest of the language here.
    30 
    31 
    31     Err(RevlogError::InvalidRevision)
    32     Err(
       
    33         HgError::unsupported(format!("cannot parse revset '{}'", input))
       
    34             .into(),
       
    35     )
    32 }
    36 }
    33 
    37 
    34 /// Resolve the small subset of the language suitable for revlogs other than
    38 /// Resolve the small subset of the language suitable for revlogs other than
    35 /// the changelog, such as in `hg debugdata --manifest` CLI argument.
    39 /// the changelog, such as in `hg debugdata --manifest` CLI argument.
    36 ///
    40 ///