This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: introduce a symbolic constant for the AMBIGUOUS_TIME marker
ClosedPublic

Authored by marmoute on Jul 2 2021, 11:17 AM.

Details

Summary

This is going to be clearer and easier to track than -1. Ultimately I would
like to get ride of this special value everywhere but in the lower level,
however we need to clarify the API first. This changeset is part of such
clarification.

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

marmoute created this revision.Jul 2 2021, 11:17 AM

+1 for having a named constant but I’m not sure about the AMBIGUOUS_TIME name. mtime == -1 is used together with state == 'n' indeed to indicate an ambiguous time, but it also for other values of state where the mtime field is simply unused. In the later cases the time is not necessarily ambiguous, it’s just irrelevant.

+1 for having a named constant but I’m not sure about the AMBIGUOUS_TIME name. mtime == -1 is used together with state == 'n' indeed to indicate an ambiguous time, but it also for other values of state where the mtime field is simply unused. In the later cases the time is not necessarily ambiguous, it’s just irrelevant.

same feedback as for the previous one. Unless we have a much better name at hand, I don't think this is an issue since the goal is to make this dissapear.

SimonSapin accepted this revision.Jul 2 2021, 6:25 PM

Sounds good

pulkit accepted this revision.Jul 3 2021, 7:40 AM
This revision is now accepted and ready to land.Jul 3 2021, 7:40 AM