Mercurial > public > mercurial-scm > hg
comparison rust/hg-cpython/src/exceptions.rs @ 50972:3aca98a35727
rust: remove unused error variant
All paths check that the working directory revision is not used.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 07 Aug 2023 15:07:48 +0200 |
parents | 35ebe6f824be |
children | 4c5f6e95df84 |
comparison
equal
deleted
inserted
replaced
50971:c950fdba7472 | 50972:3aca98a35727 |
---|---|
23 impl GraphError { | 23 impl GraphError { |
24 pub fn pynew(py: Python, inner: hg::GraphError) -> PyErr { | 24 pub fn pynew(py: Python, inner: hg::GraphError) -> PyErr { |
25 match inner { | 25 match inner { |
26 hg::GraphError::ParentOutOfRange(r) => { | 26 hg::GraphError::ParentOutOfRange(r) => { |
27 GraphError::new(py, ("ParentOutOfRange", r)) | 27 GraphError::new(py, ("ParentOutOfRange", r)) |
28 } | |
29 hg::GraphError::WorkingDirectoryUnsupported => { | |
30 match py | |
31 .import("mercurial.error") | |
32 .and_then(|m| m.get(py, "WdirUnsupported")) | |
33 { | |
34 Err(e) => e, | |
35 Ok(cls) => PyErr::from_instance(py, cls), | |
36 } | |
37 } | 28 } |
38 } | 29 } |
39 } | 30 } |
40 | 31 |
41 pub fn pynew_from_vcsgraph( | 32 pub fn pynew_from_vcsgraph( |