Show More
@@ -18,21 +18,19 b' pub fn resolve_single(' | |||||
18 | ) -> Result<Revision, RevlogError> { |
|
18 | ) -> Result<Revision, RevlogError> { | |
19 | let changelog = repo.changelog()?; |
|
19 | let changelog = repo.changelog()?; | |
20 |
|
20 | |||
21 | match resolve_rev_number_or_hex_prefix(input, &changelog.revlog) { |
|
21 | match input { | |
22 | Err(RevlogError::InvalidRevision) => {} // Try other syntax |
|
22 | "null" => return Ok(NULL_REVISION), | |
23 | result => return result, |
|
23 | _ => {} | |
24 | } |
|
24 | } | |
25 |
|
25 | |||
26 | if input == "null" { |
|
26 | match resolve_rev_number_or_hex_prefix(input, &changelog.revlog) { | |
27 | return Ok(NULL_REVISION); |
|
27 | Err(RevlogError::InvalidRevision) => { | |
|
28 | // TODO: support for the rest of the language here. | |||
|
29 | let msg = format!("cannot parse revset '{}'", input); | |||
|
30 | Err(HgError::unsupported(msg).into()) | |||
|
31 | } | |||
|
32 | result => return result, | |||
28 | } |
|
33 | } | |
29 |
|
||||
30 | // TODO: support for the rest of the language here. |
|
|||
31 |
|
||||
32 | Err( |
|
|||
33 | HgError::unsupported(format!("cannot parse revset '{}'", input)) |
|
|||
34 | .into(), |
|
|||
35 | ) |
|
|||
36 | } |
|
34 | } | |
37 |
|
35 | |||
38 | /// Resolve the small subset of the language suitable for revlogs other than |
|
36 | /// Resolve the small subset of the language suitable for revlogs other than |
General Comments 0
You need to be logged in to leave comments.
Login now