File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -352,11 +352,14 @@ module Version = struct
352352
353353 (* We assume something like, 2.0.0+git@7e211ffd *)
354354 let of_string s : t =
355- let rex = Re.Pcre. regexp " ([\\ .\\ d ]+)([^\\ .]+)?" in
355+ let rex = Re.Pcre. regexp " (?:rolling-release-v)?( [\\ .\\ dx ]+)([^\\ .]+)?" in
356356 let sub = Re.Pcre. exec ~rex s in
357357 let num = Re.Pcre. get_substring sub 1 in
358358 let str = try Re.Pcre. get_substring sub 2 with _ -> " " in
359- let num = String. split_on_char '.' num |> List. map int_of_string in
359+ let num =
360+ let int_of_string s = if s = " x" then max_int else int_of_string s in
361+ String. split_on_char '.' num |> List. map int_of_string
362+ in
360363 (num, str)
361364
362365 (* * Number part. *)
Original file line number Diff line number Diff line change 11let () = assert (" aa\\\" bb" = Lang_string. escape_utf8_string " aa\" bb" )
2+
3+ (* Bug #4287 *)
4+ let () =
5+ ignore (Lang_string.Version. of_string " rolling-release-v2.3.x+git@2addd93da" )
You can’t perform that action at this time.
0 commit comments