2011-11-03 203 views
124

我無法做SVN提交。我得到這個錯誤:SVN升級工作副本

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) 

它如何被固定? 謝謝。

回答

146

你必須升級你的Subversion客戶端至少1.7。

用命令行客戶端,你必須通過發出命令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

TSVN將執行工作副本下一個寫操作升級:

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

當我發出'svn upgrade'命令時,Ubuntu告訴我'command not found' – geneorama

+0

@geneorama:你安裝了'svn'嗎? ('sudo apt-get install svn') – knittl

+3

感謝您的回覆!我確實安裝了svn(顛覆版),但它是版本1.6,它沒有'upgrade'命令。如果不添加新的ppa,Ubuntu 12.04將不會安裝1.7。 http://askubuntu.com/questions/65468/where-can-i-find-a-subversion-1-7-binary – geneorama

1

升級到烏龜SVN的最新版本後,我需要做一個「升級」第一(而不是「更新」!)。

57

from eclipse,你可以選擇項目,右鍵 - >團隊 - >升級

+0

無法找到升級選項 –

2

這個問題是由於你t ry編譯具有比您當前使用的舊SVN文件的項目。

你有兩個解決方案來解決這個問題

  1. 安裝1.6版本SVN是與項目SVN文件兼容
  2. 嘗試升級項目。(並不總是工作)。
2

如果您剛剛在計算機上升級到SVN 1.7(如我剛纔那樣),並且需要升級您的Eclipse工作區中的許多項目,則可以在終端窗口中執行以下操作Unix的baesd系統:

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

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

谷歌上搜索了一下後,我發現似乎是針對Windows用戶的等價物:

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

見阿列克謝謝爾巴克中途道瓊斯答案在頁面中。

1

如果您收到來自Netbeans的這個錯誤(7.2+),那麼就意味着你單獨安裝Subversion的版本比在NetBeans版本更高。在我的情況下,Netbeans(v7.3.1)擁有SVN v1.7,我剛剛將我的SVN升級到了v1.8。

如果您在Tools > Options > Miscellaneous (tab) > Versioning (tab) > Subversion (pane)看,設置首選客戶端= CLI,那麼你可以設置路徑的安裝SVN這對我來說是C:\Program Files\TortoiseSVN\bin

更可以在Netbeans Subversion Clients FAQ找到。

1

在Visual Studio AnkhSVN,有也是一個「升級工作副本」解決方案資源管理解決方案(如適用)的上下文菜單選項下。

5

在MacOS:

  1. 獲取從here最新的編譯SVN客戶端二進制文件。
  2. 安裝。
  3. 將二進制文件添加到路徑(最後一個安裝屏幕解釋如何)。
  4. 打開終端,並在你的項目目錄中運行以下命令:

    svn upgrade

0

您可以升級到1.7顛覆。爲了更新到Subversion 1.7,您必須在Xcode 5或更高版本中啓動現有項目這會提示'The working copy ProjectName should be upgraded to Subversion 1.7'(如下圖所示)。

Screenshot for warning

你應該選擇「Upgrade」按鈕,升級到1.7顛覆。這將需要一些時間。

如果您正在使用終端那麼你可以通過在你的項目目錄中運行以下命令升級到Subversion 1.7:SVN升級

注意,一旦你有upgraded to Subversion 1.7 you cannot go back to Subversion 1.6.

Refer Apple docs for more details.

0

當其他工作副本嵌套到您的工作副本中時,您也可能會收到有關是否需要升級工作副本的奇怪消息。我在Symphony項目中遇到過這個問題,其中一些框架文件夾是工作副本,我想在發佈之前沒有正確清理過。

在這種情況下,只需進行文件搜索.svn,並刪除不需要的.svn文件夾(不要刪除您的根目錄)。