SVN upgrade working copy

强颜欢笑 提交于 2020-01-18 12:21:43

问题


I cannot do a SVN commit. I get this error:

org.apache.subversion.javahl.ClientException: The working copy needs to be upgraded
svn: Working copy 'C:\.... is too old (format 10, created by Subversion 1.6)

How can it be fixed?


回答1:


You have to upgrade your subversion client to at least 1.7.

With the command line client, you have to manually upgrade your working copy format by issuing the command svn upgrade:

Upgrading the Working Copy

Subversion 1.7 introduces substantial changes to the working copy format. In previous releases of Subversion, Subversion would automatically update the working copy to the new format when a write operation was performed. Subversion 1.7, however, will make this a manual step. Before using Subversion 1.7 with their working copies, users will be required to run a new command, svn upgrade to update the metadata to the new format. This command may take a while, and for some users, it may be more practical to simply checkout a new working copy.
— Subversion 1.7 Release Notes

TortoiseSVN will perform the working copy upgrade with the next write operation:

Upgrading the Working Copy

Subversion 1.7 introduces substantial changes to the working copy format. In previous releases, Subversion would automatically update the working copy to the new format when a write operation was performed. Subversion 1.7, however, will make this a manual step.

Before you can use an existing working copy with TortoiseSVN 1.7, you have to upgrade the format first. If you right-click on an old working copy, TortoiseSVN only shows you one command in the context menu: Upgrade working copy.
— TortoiseSVN 1.7 Release notes




回答2:


from eclipse, you can select on the project, right click->team->upgrade




回答3:


On MacOS:

  1. Get the latest compiled SVN client binaries from here.
  2. Install.
  3. Add binaries to path (the last installation screen explains how).
  4. Open terminal and run the following command on your project directory:

    svn upgrade




回答4:


If you have just upgraded to SVN 1.7 on your machine (like I just did), and have a lot of projects in your Eclipse workspace which need to be upgraded, you can do the following in a terminal window on Unix-baesd systems:

cd [eclipse/workspace] # <- you supply the actual path here

for file in `find . -depth 2 -name "*.svn"`; do svn upgrade `dirname $file` ; done;

After Googling a bit, I found what seems to be the equivalent for Windows users:

http://www.rqna.net/qna/mnrmqn-how-to-find-all-svn-working-copies-on-win-xp.html

See the answer by Alexey Shcherbak halfway down the page.




回答5:


This problem due to that you try to compile project that has the files of OLder SVN than you currently use.

You have two solutions to resolve this problem

  1. to install the version 1.6 SVN to be compatible with project SVN files
  2. try to upgrade the project ..( not always working ).



回答6:


After upgrading to the latest version of Tortoise-SVN I needed to do an "Upgrade" first (as opposed to "Update"!).




回答7:


If you're getting this error from Netbeans (7.2+) then it means that your separately installed version of Subversion is higher than the version in netbeans. In my case Netbeans (v7.3.1) had SVN v1.7 and I'd just upgraded my SVN to v1.8.

If you look in Tools > Options > Miscellaneous (tab) > Versioning (tab) > Subversion (pane), set the Preferred Client = CLI, then you can set the path the the installed SVN which for me was C:\Program Files\TortoiseSVN\bin.

More can be found on the Netbeans Subversion Clients FAQ.




回答8:


With AnkhSVN in Visual Studio, there's also an "Upgrade Working Copy" option under the context menu for the solution in the Solution Explorer (when applicable).




回答9:


You can also get strange messages about the need to upgrade your working copy when there are other working copies nested into yours. I had this issue with a Symphony project were some framework folders are working copy, that I suppose have not been cleaned up properly before they were published.

In this case, just make a file search for .svn, and delete the .svn folders that you don't want (don't delete yours at the root of course).




回答10:


You can upgrade to Subversion 1.7. In order to update to Subversion 1.7 you have to launch existing project in Xcode 5 or above. This will prompt an warning ‘The working copy ProjectName should be upgraded to Subversion 1.7’ (shown in below screenshot).

You should select ‘Upgrade’ button to upgrade to Subversion 1.7. This will take a bit of time.

If you are using terminal then you can upgrade to Subversion 1.7 by running below command in your project directory: svn upgrade

Note that once you have upgraded to Subversion 1.7 you cannot go back to Subversion 1.6.

Refer Apple docs for more details.



来源:https://stackoverflow.com/questions/7992034/svn-upgrade-working-copy

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