Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I had to restore a subversion server from a backup image taken the previous night. Everything worked fine after the restore except for one repository.

A working copy had been committed on the server after the latest backup, so this working copy had newer files than the restored repository. I tried to commit the files using tortoise, but SVN didn't recognize that the files on the working copy were newer than those in the repository.

I'm using Subversion Server 1.6.5 on Windows 2003 Server and TortoiseSVN 1.6.8 64 bit on a Win7 64 bit client.

Thanks, John

share|improve this question

3 Answers 3

This is because SVN uses a local 'cache' of the working copy files to decide what is different from the repository (so it doesn't have to contact the repo, to fetch the file, to diff it, just to find out that you've changed it).

In this case, that isn't working as you want as the working copy (and its cache) is out of sync with the repo. When you change those file and commit them, then you'll find that SVN will re-sync itself (and throw a 'whats going on' error no doubt).

So, you need to re-sync the working copy cache manually. First, take a copy of the working copy directory without the cache - ie the .svn directories. (search for .svn using the old Windows Search doggie and delete all those directories)

Then update the directory to fetch the current status of the repo, I think SVN will update the cache and will merge your local changes to the files in the repo, so you will be back to normal - ie the changed files will get the 'modified' icon, and then you can commit the changes. I'm pretty sure this is what will happen, but I'm always paranoid about losing data after a restore which is why you will first make the copy. If anything goes wrong, you can just overwrite the files fetched from the repo with your old WC, and it'll show as modified. commit as normal.

share|improve this answer

On windows create two batch files:

First

[dobackups.bat]

@echo off
echo - BORN 05 SVN Repository export batch file -

set Rep=C:\Repositories\
set BackUps=c:\backups
CD %Rep%

rem Don't need %Backup% because you're already changed to it.
for /f %%R in ('dir/b') do call :1 %%R
goto :eof

:1
echo Exporteren van %Rep%%1 naar %Backups%\%1.bak
"C:\Program Files\VisualSVN Server\bin\svnadmin" dump %Rep%%1 > %Backups%\%1.bak
echo Done!
echo .........................................
CALL WAIT 3

[WAIT.BAT]

@ping 127.0.0.1 -n 2 -w 1000 > nul
@ping 127.0.0.1 -n %1% -w 1000> nul
share|improve this answer

Touch the newer files once more, and try a commit again.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.