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

File modification detection?

From: Andy Whitcroft <apw_at_shadowen.org>
Date: 2004-04-17 14:00:49 CEST

It appears that the client file modification detection is incorrectly checking modification time and assuming that if that is unchanged the file is unchanged even in the face of the size/inode number changing.

Reproduce recipe follows:
        svn --version
        rm -rf REPO repo
        svnadmin create REPO
        svn checkout file://localhost/`pwd`/REPO repo
        cd repo
        touch foo
        svn add foo
        svn commit -m add
        echo "one" >one; echo "two two" >two
        ls -li one two
        mv one foo
        svn commit -m one
        ls -li
        mv two foo
        svn commit -m two
        ls -li

Here is a trace of running this recipe (sh -x), note htat when two is moved over foo it is blatently a different sized file, but it is not checked in.

        apw@voidhawk:~/test$ sh -x test
        + svn --version
        svn, version 1.0.1 (r9023)
           compiled Apr 11 2004, 01:09:01
        Copyright (C) 2000-2004 CollabNet.
        Subversion is open source software, see http://subversion.tigris.org/
        This product includes software developed by CollabNet (http://www.Collab.Net/).
        The following repository access (RA) modules are available:
        * ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
          - handles 'http' schema
          - handles 'https' schema
        * ra_local : Module for accessing a repository on local disk.
          - handles 'file' schema
        * ra_svn : Module for accessing a repository using the svn network protocol.
          - handles 'svn' schema
        + rm -rf REPO repo
        + svnadmin create REPO
        ++ pwd
        + svn checkout file://localhost//home/apw/test/REPO repo
        Checked out revision 0.
        + cd repo
        + touch foo
        + svn add foo
        A foo
        + svn commit -m add
        Adding foo
        Transmitting file data .
        Committed revision 1.
        + echo one
        + echo 'two two'
        + ls -li one two
        3875570 -rw-r--r-- 1 apw apw 4 Apr 17 12:58 one
        3875571 -rw-r--r-- 1 apw apw 8 Apr 17 12:58 two
        + mv one foo
        + svn commit -m one
        Sending foo
        Transmitting file data .
        Committed revision 2.
        + ls -li
        total 8
        3875570 -rw-r--r-- 1 apw apw 4 Apr 17 12:58 foo
        3875571 -rw-r--r-- 1 apw apw 8 Apr 17 12:58 two
        + mv two foo
        + svn commit -m two
        + ls -li
        total 4
        3875571 -rw-r--r-- 1 apw apw 8 Apr 17 12:58 foo

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Apr 17 14:01:33 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.