[Updated] D11888: dirstate: Document Timestamp.second_ambiguous
SimonSapin
phabricator at mercurial-scm.org
Fri Dec 10 11:17:26 UTC 2021
Closed by commit rHGc8ca21962ff4: dirstate: Document Timestamp.second_ambiguous (authored by SimonSapin).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11888?vs=31398&id=31406
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11888/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11888
AFFECTED FILES
mercurial/dirstateutils/timestamp.py
CHANGE DETAILS
diff --git a/mercurial/dirstateutils/timestamp.py b/mercurial/dirstateutils/timestamp.py
--- a/mercurial/dirstateutils/timestamp.py
+++ b/mercurial/dirstateutils/timestamp.py
@@ -21,13 +21,16 @@
A Unix timestamp with optional nanoseconds precision,
modulo 2**31 seconds.
- A 2-tuple containing:
+ A 3-tuple containing:
`truncated_seconds`: seconds since the Unix epoch,
truncated to its lower 31 bits
`subsecond_nanoseconds`: number of nanoseconds since `truncated_seconds`.
When this is zero, the sub-second precision is considered unknown.
+
+ `second_ambiguous`: whether this timestamp is still "reliable"
+ (see `reliable_mtime_of`) if we drop its sub-second component.
"""
def __new__(cls, value):
@@ -93,7 +96,8 @@
def reliable_mtime_of(stat_result, present_mtime):
- """same as `mtime_of`, but return None if the date might be ambiguous
+ """Same as `mtime_of`, but return `None` or a `Timestamp` with
+ `second_ambiguous` set if the date might be ambiguous.
A modification time is reliable if it is older than "present_time" (or
sufficiently in the future).
To: SimonSapin, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211210/16868b65/attachment-0002.html>
More information about the Mercurial-patches
mailing list