[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn completely looses file modifications due to FAT 2s time resolution (data loss!!?)

From: C.A.T.Magic <c.a.t.magic_at_gmx.at>
Date: 2004-07-12 03:24:47 CEST

Hi subversion devs!

I already pointed out that the 'sleep_for_timestamps'
is a really weak solution and will break for FAT disks,
because FAT only records file modifications with
a resolution of 2 seconds (and some very strange
time-rounding rules... afair).

Please look at the small script below,
and its output. only the FIRST revision gets committed,
even though there should be 5 commited revisions.
this means that 4 file modifications are LOST.

it works if i put a 'sleep' after each svn commit command.

===========
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
===

The script was tested on a 256MB FAT(16) partition,
WindowsXP svn version 1.0.4 (r9844) using file:///
- svn 1.1/latest also has the same bug.

please fix this, at least by increasing
that sleep to some "2.5second" wait...

a smart solution could be:
write a ".svn/dummy" file to disk,
read back its modification time and wait
for that time to pass by.

thanks
=====
c.a.t.

P.S.: is it really useful to have
   svn st -v output
the "." folders?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 12 03:24:36 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.