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

packing causes 'svnadmin verify' to fail

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 27 Dec 2008 15:39:01 +0200 (Jerusalem Standard Time)

Summary: 'svnadmin pack' can bring the repository to a state where
'svnadmin verify' fails.

I can reproduce it with the svn repository, I couldn't find how to
reproduce it in a Greek tree repository.

Reproduction script:

    @echo off

    cd \tmp\svn

    echo @@@ Versions
    svn --version | head -2
    svnsync --version | head -2
    svnadmin --version | head -2

    echo @@@ Recreate the repository
    rd/s/q r
    svnadmin create r
    touch r\hooks\pre-revprop-change.bat

    echo @@@ Set small shards (so packing has an effect)
    ### Couldn't get perl to maintain EOL style.
    vim -Nneu NONE -i NONE -b -c "set noreadonly | 2s/sharded 1000/sharded 4/ | wq!" r\db\format

    echo @@@ Hack. Force the sync to abort after syncing r9.
    mkdir r\db\revprops\2\10

    echo @@@ Sync.
    svnsync init file:///tmp/svn/r http://svn.collab.net/repos/svn
    svnsync sync file:///tmp/svn/r
    echo @@@ The above error was expected.

    echo @@@ This will work:
    svnadmin verify -r2 r

    echo @@@ Packing...
    svnadmin pack r

    echo @@@ This will fail:
    svnadmin verify -r2 r

Output:

    @@@ Versions
    svn, version 1.6.0 (dev build-r34949)
       compiled Dec 27 2008, 00:28:10
    svnsync, version 1.6.0 (dev build-r34949)
       compiled Dec 27 2008, 00:28:10
    svnadmin, version 1.6.0 (dev build-r34949)
       compiled Dec 27 2008, 00:28:10
    ### I actually used r34952; the output is wrong.
    @@@ Recreate the repository
    @@@ Set small shards (so packing has an effect)
    @@@ Hack. Force the sync to abort after syncing r9.
    @@@ Sync.
    Copied properties for revision 0.
    Transmitting file data .........................................................
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    .........................................................
    Committed revision 1.
    Copied properties for revision 1.
    Transmitting file data .
    Committed revision 2.
    Copied properties for revision 2.
    Transmitting file data .
    Committed revision 3.
    Copied properties for revision 3.
    Transmitting file data .
    Committed revision 4.
    Copied properties for revision 4.
    Transmitting file data .
    Committed revision 5.
    Copied properties for revision 5.
    Transmitting file data .
    Committed revision 6.
    Copied properties for revision 6.
    Transmitting file data .
    Committed revision 7.
    Copied properties for revision 7.
    Transmitting file data .
    Committed revision 8.
    Copied properties for revision 8.
    Transmitting file data .
    Committed revision 9.
    Copied properties for revision 9.
    Transmitting file data .
    ..\..\..\subversion\libsvn_subr\io.c:2900: (apr_err=720005)
    svnsync: Can't move '\tmp\svn\r\db\transactions\9-9.txn\props' to '\tmp\svn\r\db\revprops\2\10': Access is denied.
    @@@ The above error was expected.
    @@@ This will work:
    * Verified revision 2.
    @@@ Packing...
    @@@ This will fail:
    ..\..\..\subversion\libsvn_fs_fs\fs_fs.c:3695: (apr_err=160004)
    svnadmin: Invalid changes line in rev-file

Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=993717
Received on 2008-12-27 15:37:49 CET

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.