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

Re: svn does not detect file recodings as changes

From: Jan Hendrik <jan.hendrik_at_myrealbox.com>
Date: 2007-02-21 17:52:43 CET

Concerning Re: svn does not detect file recodi
Duncan Murdoch wrote on 20 Feb 2007, 10:05, at least in part:

> On 2/20/2007 9:13 AM, Jan Hendrik wrote:

[...]

> > Anyway, the current SVN behaviour is in so far even worse as in a
> > svn update any modification in such files is not merged, but
> > overwritten - read: lost - as I just confirmed in a test, even if
> > the filesize has changed by this "non-mtimed" modification. So IMHO
> > SVN makes quite a dangerous guess by exclusively relying on mtime
> > even in cases where modifications are not only just not committed,
> > but could be written over.
>
> I'd call this a bug. You should put together a demo script and submit
> a bug report.
>
> It's arguable whether to use mtime or ctime or a full binary compare,
> but to ignore changes in file size before a destructive update is
> clearly a bug.

Not being used to software development and bug reporting I'm not
sure if this is the right way as suggested by you, but this is what I did:

WC A on \\PC1:

svn update \\PC1\d\wc => rev. 1857 = HEAD

\\PC1\d\wc\foo.php (7,847 bytes, Aug. 9, 2006 21:49:00)
\\PC1\d\wc\bar.php (7,685 bytes, Aug. 9, 2006 21:49:00)

edit foo.php & bar.php

save both, touch timestamps => Aug. 9, 2006 21:49:00

new filesizes:
\\PC1\d\wc\foo.php : 7,847 bytes (unintentionally, but welcome)
\\PC1\d\wc\bar.php : 7,744 bytes

svn status \\PC1\d\wc (no modifications reported)

-------------------------

WC B on \\PC2:

svn update \\PC1\d\wc => rev. 1857 = HEAD

edit:
\\PC2\d\wc\foo.php (7,831 bytes)
\\PC2\d\wc\bar.php (7,726 bytes)

svn commit \\PC2\d\wc\ (both files committed, HEAD now 1858)

------------------------

WC A on \\PC1:

svn update =>
\\PC1\d\wc\foo.php & \\PC1\d\wc\bar.php updated to rev 1858
(HEAD)
filesizes 7,831 and 7,726 bytes resp. as committed in WC B,
timestamp Feb 20, 2007 16:33:36 (commit time)
modifications lost in both files, no merge has happened

For greater clarity I used UNC path, actually I worked locally on the
respective machines where the path is d:\wc\ on both.

I have repeated tests on several files in several directories during a
couple of days, first still with SVN 1.4.2, then upgraded to current
1.4.3 for confirmation.

System:
Win2K SP4 SRP1
NTFS filesystem
SVN 1.4.3 (same with 1.4.2)
BDB repository (created with SVN 1.4.2, dump/load cyclus)

HTH.

JH

---------------------------------------
Freedom quote:

     ... the question becomes,
     are you going to have everyone play by the same rules,
     or are you going to try to rectify the shortcomings,
     errors and failures of the entire cosmos?
     Because those things are wholly incompatible.
     If you're going to have people play by the same rules,
     that can be enforced with a minimum amount
     of interference with people's freedom.
     But if you're going to try to make the entire cosmos right and just,
     somebody has got to have an awful lot of power
     to impose what they think is right on an awful lot of other people.
     What we've seen, particularly in the 20th century,
     is that putting that much power in anyone's hands is enormously dangerous.
               -- Thomas Sowell, 1999

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Feb 21 17:52:24 2007

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

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