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

Re: svn status does not detect a modification if the same file was touched

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 19 Oct 2017 16:17:08 +0000

Ralph Seichter wrote on Thu, 19 Oct 2017 13:01 +0200:
> On 19.10.2017 12:16, Sasikala Kottegoda wrote:
> > In this scenario, svn status does not show anything. Also, the file
> > does not get commited when I issue an 'svn commit'. Is there a reason
> > for that?
> Subversion uses a hash of the file content to determine if it has been
> modified. Changing the modification date in the working copy, as you did
> with 'touch', does not alter the content, hence the file is considered
> unchanged.

Subversion doesn't use checksums to detect modifications. 'svn status'
is based on filesize + mtime only. If mtime differs but filesize doesn't, then
a full content diff is done.

> This is deliberate.

Yes, it is, for efficiency reasons. (stat() is cheaper than read())
Received on 2017-10-19 18:17:12 CEST

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.