History | View | Annotate | Download (10.7 kB)
Move getCurrentTime from Confd.Utils to Utils
The getCurrentTime function is of wide interest, so its moved to a moreappropriate position.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Make niceSort a wrapper over niceSortKey id
Currently, niceSort behaves differently than niceSortKey in caseswhere the parsed groups are equal but the original not, as it usesboth members of the tuple as opposed to just the first one. BothniceSortKey and the Python code use only the first one, so in corner...
Utils.hs: add a clockTimeToString function
This function allows to easily convert a ClockTime object to a stringrepresentation of its timestamp (seconds-only).
Signed-off-by: Dato Simó <dato@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Utils.hs: function to chomp prefix + separator from a string
Some auto-repair tags are composed of a prefix and then an optionalargument; the new "chompPrefix" function in Utils.hs allows to strip aprefix, allowing the last character (the separator) to be absent if there...
Rename htools/ to src/
Per offline discussions, this is the first patch of therenames. Tested with "make distcheck", seems to work fine.
The only change outside of the renaming is a bit of simplification inthe .gitignore rules; otherwise, simply s/htools/src/....