##// END OF EJS Templates
dirstate: Document Timestamp.second_ambiguous...
Simon Sapin -
r49271:c8ca2196 default
parent child Browse files
Show More
@@ -21,13 +21,16 b' class timestamp(tuple):'
21 A Unix timestamp with optional nanoseconds precision,
21 A Unix timestamp with optional nanoseconds precision,
22 modulo 2**31 seconds.
22 modulo 2**31 seconds.
23
23
24 A 2-tuple containing:
24 A 3-tuple containing:
25
25
26 `truncated_seconds`: seconds since the Unix epoch,
26 `truncated_seconds`: seconds since the Unix epoch,
27 truncated to its lower 31 bits
27 truncated to its lower 31 bits
28
28
29 `subsecond_nanoseconds`: number of nanoseconds since `truncated_seconds`.
29 `subsecond_nanoseconds`: number of nanoseconds since `truncated_seconds`.
30 When this is zero, the sub-second precision is considered unknown.
30 When this is zero, the sub-second precision is considered unknown.
31
32 `second_ambiguous`: whether this timestamp is still "reliable"
33 (see `reliable_mtime_of`) if we drop its sub-second component.
31 """
34 """
32
35
33 def __new__(cls, value):
36 def __new__(cls, value):
@@ -93,7 +96,8 b' def mtime_of(stat_result):'
93
96
94
97
95 def reliable_mtime_of(stat_result, present_mtime):
98 def reliable_mtime_of(stat_result, present_mtime):
96 """same as `mtime_of`, but return None if the date might be ambiguous
99 """Same as `mtime_of`, but return `None` or a `Timestamp` with
100 `second_ambiguous` set if the date might be ambiguous.
97
101
98 A modification time is reliable if it is older than "present_time" (or
102 A modification time is reliable if it is older than "present_time" (or
99 sufficiently in the future).
103 sufficiently in the future).
General Comments 0
You need to be logged in to leave comments. Login now