Skip to content
Snippets Groups Projects
Commit 9fb6bceca334 authored by Georges Racinet's avatar Georges Racinet
Browse files

rhgitaly::message: made timestamp parsing public

It can be used for more than just putting in a `GitCommit` message.
parent 44d91b3995c2
No related branches found
No related tags found
2 merge requests!249Merged stable branch into default,!247RefService.ListRefs: implement sort options
......@@ -47,8 +47,8 @@
/// Python Mercurial reference implementation.
/// In particular the Python implementation converts seconds to `float` (in practice, the data does
/// never seem to contain a fractional part). Using `f64` because `f32` introduces rounding errors.
/// TODO should be upstreamed to hg-core
fn parse_timestamp_line(line: &[u8]) -> Result<(f64, i32), TimeStampParseError> {
/// TODO consider version of Mercurial 6.7 when we can use it.
pub fn parse_timestamp_line(line: &[u8]) -> Result<(f64, i32), TimeStampParseError> {
if line.is_empty() {
return Err(TimeStampParseError::Empty);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment