Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TortoiseSVN Won't Allow Me To Add Any Files

I am trying to add files to an SVN repository using TortoiseSVN 1.8.1. I right click on the files and select TortoiseSVN->Add. I then select all the files in the window that pops up and click OK. Upon clicking OK, another dialog box pops up and all the files appear to be successfully added because it says "Added" next to each file and finally it says "Completed!" at the bottom. I click OK, and then right click on the parent directory and click "Commit". I fill out the message box and ensure that all the files I added are checked and they all say "added" under "status". Finally, I click "OK". A box pops up, as it normally does, saying "You haven't entered an issue Number", and I click "Proceed without an issue number". The next box that pops up has a line that says "Adding" with a file that I'm trying to add followed by:

Error: Commit failed (details follow):  
Error: File '%Path to my file%' is  
Error:  out of date  
Error: File '%File name%' already exists  
Error: You have to update your working copy first.  

I successfully update my working copy, which has no changes. I also do a successful cleanup. I have tried deleting the parent directory and deleting the base folder altogether and rechecking out the base folder.

I check the repository and there is no file there with the file name of the file being added.

All of the above was through the gui. Using command prompt I got the following:

svn status:
svn: E155037: Previous operation has not finished; run 'cleanup' if it was interrupted

svn cleanup 5.0.1:
svn: E155009: Failed to run the WC DB work queue associated with '%PathToBaseRepoFolder%', work item 12841 (sync-file-flags 56 %Path to another file I was unable to add from the base repo folder%)
svn: E720003: Can't set file '%Full path to the other file I was unable to add%' read-write: The system cannot find the path specified.

If I do an update and cleanup from the gui, it says both are successful.

We're using http://

I believe the permissions are correct.

like image 305
Matt_Bro Avatar asked Aug 01 '13 17:08

Matt_Bro


2 Answers

Happened to me couple of now many times with TortoiseSVN 1.8.2 - 1.8.10. I found this blog post which solved this problem once, until it pops up again. It annoyed me so much that I wrote a quick bat file script that I run from desktop.

Prerequisites

  1. Download and unzip sqlite3 shell tool, e.g. sqlite-shell-win32-x86-3080803.zip
  2. Adjust paths in the commands below to match your environment

Fix (manual)

Run this if you just want to test if this helps

  1. In CMD do C:\Downloads\sqlite3.exe "C:\src\.svn\wc.db"
  2. Once in sqlite shell run delete from WORK_QUEUE;
  3. Run tortoise svn clean up

Fix (automated)

If previous step worked for you, consider automating the process with these steps

  1. Go to your .svn folder, e.g. C:\src\.svn
  2. Copy sqlite3 shell tool there
  3. Create a fix-svn.bat file in that folder
  4. Insert scripting code, and adjust paths

    "C:\src\.svn\sqlite3.exe" wc.db "delete from WORK_QUEUE"
    "C:\Program Files\TortoiseSVN\bin\svn" cleanup "C:\src"
    
  5. Save bat file and make a shortcut to your desktop

  6. Next time you need to fix it, just run the shortcut on your desktop
like image 107
oleksii Avatar answered Sep 18 '22 13:09

oleksii


The problem was I updated to version 1.8.1 which has a bug. I downloaded version 1.8.0 and it works fine.

like image 27
Matt_Bro Avatar answered Sep 21 '22 13:09

Matt_Bro