This is an archive of the discontinued Mercurial Phabricator instance.

rust: Add a Timestamp struct instead of abusing Duration
ClosedPublic

Authored by SimonSapin on Apr 20 2021, 10:17 AM.

Details

Summary

SystemTime would be the standard library type semantically appropriate
instead of Duration.

But since the value is coming from Python as a plain integer and used in
dirstate packing code as an integer, let’s make a type that contains a single
integer instead of using one with sub-second precision.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

SimonSapin created this revision.Apr 20 2021, 10:17 AM

Oops, I forgot to connect them but this stack depends on the one at https://phab.mercurial-scm.org/D10370

baymax updated this revision to Diff 27135.

✅ refresh by Heptapod after a successful CI run (🐙 💚)

Alphare accepted this revision.Apr 22 2021, 4:22 AM
This revision is now accepted and ready to land.Apr 22 2021, 4:22 AM