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

Re: Inconsistency handling binary files

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-07-06 18:32:22 CEST

On Jul 6, 2005, at 8:10 AM, Assaf Berg wrote:

> It seems like changes to binary files without changing the
> modification time of the file will not be detected by svn diff or
> even svn status and svn update commands (i'm using subversion
> v1.1.3). This can happen when you copy files around, which
> preserves their timestamps by default. Only after 'touch'-ing the
> file I can see it has changed and am able to commit it.

svn, just like cvs, uses the timestamp to decide if a file is changed
or not. The algorithm looks something like:

    if (timestamp unchanged)
       return UNCHANGED
    else if (filesize changed)
       return CHANGED
    else
       compare byte-for-byte with text-base

So yes, if you change the file, but not the timestamp, both cvs and
svn will fail to notice the file changed. Don't Do That.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jul 6 18:41:59 2005

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