diff tests/test-dirstate.t @ 17733:3c775c5a6c03

dirstate: handle large dates and times with masking (issue2608) Dates and times that are outside the 31-bit signed range are now compared modulo 2^31. This should prevent it from behaving badly with very large files or corrupt dates while still having a high probability of detecting changes.
author Matt Mackall <mpm@selenic.com>
date Mon, 08 Oct 2012 17:50:42 -0500
parents 45cf6a91a02d
children 4720d2c903a2
line wrap: on
line diff
--- a/tests/test-dirstate.t	Tue Aug 07 11:04:41 2012 +0200
+++ b/tests/test-dirstate.t	Mon Oct 08 17:50:42 2012 -0500
@@ -52,5 +52,15 @@
   $ hg status
   $ hg debugstate
   n 644          2 2021-01-01 12:00:00 a
-  $ cd ..
+
+Test modulo storage/comparison of absurd dates:
 
+  $ touch -t 250001011200 a
+  $ hg st
+  $ hg debugstate
+  n 644          2 2023-08-24 13:21:04 a
+  $ touch -t 195001011200 a
+  $ hg st
+  $ hg debugstate
+  n 644          2 2018-01-19 15:14:08 a
+