TortoiseSVN Won't Allow Me To Add Any Files

时光怂恿深爱的人放手 提交于 2019-12-03 05:59:09

问题


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.


回答1:


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



回答2:


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




回答3:


Okay, I don't know if this may be an issue. I've sen this error happen when sparse checkouts are used. You can adjust what files you see during checkouts via the --depth flag and in updates via the --set-depth flag. If you --set-depth=exclude on certain files, you will see this error if you attempt to add a file.

Try this from the command line. From the ROOT of your working directory:

$ svn cleanup
$ svn update --set-depth=infinity
$ svn status

Make sure all three of these commands work. Then, try the commit.




回答4:


Update to the release candidate has solved the problem for me.




回答5:


sudo svn cleanup 

resolve my problem



来源:https://stackoverflow.com/questions/18000363/tortoisesvn-wont-allow-me-to-add-any-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!