Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Won't Fix
-
all
-
None
Description
'sleep_for_timestamps' is a weak solution and will break for FAT disks, because FAT only records file modifications with a resolution of 2 seconds. remote mounted WC directories may have a similar problem. the script below reproduces the effect: only the FIRST revision gets committed, even though there should be 5 commited revisions. this means that 4 file modifications are LOST. the effect only happens if the filesize does not change due to the edit (happens often e.g. when editing umcompressed images or editing data tables) =========== example script =========== @echo off set repos=file:///C:/SVNFAT/Repos rmdir /s/q Repos rmdir /s/q Work svnadmin create Repos svn checkout %repos% Work cd Work echo mod01>file1.txt svn st -v svn commit file1.txt -m"C1" echo mod02>file1.txt svn st -v svn commit file1.txt -m"C2" echo mod03>file1.txt svn st -v svn commit file1.txt -m"C3" echo mod04>file1.txt svn st -v svn commit file1.txt -m"C4" echo mod05>file1.txt svn st -v svn commit file1.txt -m"C5" cd ..\Work\.. pause =========== OUTPUT: =========== Checked out revision 0. A file1.txt Adding file1.txt Transmitting file data . Committed revision 1. 0 ? ? . 1 1 cat file1.txt 0 ? ? . 1 1 cat file1.txt 0 ? ? . 1 1 cat file1.txt 0 ? ? . 1 1 cat file1.txt 0 ? ? . 1 1 cat file1.txt === - bug exists in svn 1.0.x and 1.1.x -) one solution could be: write a ".svn/dummy" file to disk, read back its modification time and wait for that time to pass by. (but may still fail for remote mounted wc) -) a stable solution could be to explicitly write the timestamps to a known value that is slightly _lower_ than the real time. example: -) an svn command starts and stores the current time in a variable. startTime = 00:00:20.5 -) do_all_wc_work{ whenever a wc file gets modified, set its timestamp to 'startTime' ( FAT would be 00:00:22 ). read back the timestamp value and store it in 'endTime' if higher. (and most likely store it in entries, too). } -) wait for the realtime clock to pass 'endTime'. this is a "zero" wait in all cases where the svn command already took longer than the filesystems time precision. but please fix this for 1.0.6 and 1.1.0 releases, at least by increasing that sleep to some "2.1second" wait. ===== c.a.t. some discussion occoured here http://www.contactor.se/~dast/svn/archive-2004-07/0502.shtml http://www.contactor.se/~dast/svn/archive-2004-06/0860.shtml
Original issue reported by catmagic