Page MenuHomePhabricator

dirstate: store mtimes with nanosecond precision in memory
ClosedPublic

Authored by SimonSapin on Oct 18 2021, 10:43 AM.

Details

Summary

Keep integer seconds since the Unix epoch,
together with integer nanoseconds in the 0 <= n < 1e9 range.

For now, nanoseconds are still always zero.
This commit is about data structure changes.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

SimonSapin created this revision.Oct 18 2021, 10:43 AM
Alphare accepted this revision.Oct 19 2021, 8:44 AM
Alphare added a subscriber: Alphare.
Alphare added inline comments.
mercurial/dirstate.py
1395

Note that this comment still refers to "normal" and that lastnormaltime is still used. This could be worth following-up with a more up-to-date semantic.

This revision is now accepted and ready to land.Oct 19 2021, 8:44 AM
marmoute added inline comments.
mercurial/dirstate.py
1395

This is currently still the same logic. We should eventually just drop the lastnormaltime and replace it with comparison with fsnow during the status operation. However, not today.

marmoute retitled this revision from dirstate: Store mtimes with nanosecond precision in memory to dirstate: store mtimes with nanosecond precision in memory.
marmoute updated this revision to Diff 30917.
marmoute updated this revision to Diff 30931.Oct 20 2021, 5:12 AM