2009-11-19 92 views
13

我無法對Eclipse項目執行任何Subversion操作,因爲Subclipse無法重命名文件。錯誤是:Subclipse無法重命名文件(OS X)

Caused by: org.tigris.subversion.javahl.ClientException: svn: Cannot rename file '/Users/damianharvey/Sites/Odyssey3.5/OdysseyEDIJAXB/src/com/locuslive/edi/edifact/d95b/coreor/.svn/tmp/entries' to '/Users/damianharvey/Sites/Odyssey3.5/OdysseyEDIJAXB/src/com/locuslive/edi/edifact/d95b/coreor/.svn/entries' 
at org.tigris.subversion.javahl.JavaHLObjectFactory.throwException(JavaHLObjectFactory.java:777) 
at org.tmatesoft.svn.core.javahl.SVNClientImpl.throwException(SVNClientImpl.java:1850) 
at org.tmatesoft.svn.core.javahl.SVNClientImpl.cleanup(SVNClientImpl.java:863) 
at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.cleanup(AbstractJhlClientAdapter.java:1958) 
... 8 more 
Caused by: org.tmatesoft.svn.core.SVNException: svn: Cannot rename file '/Users/damianharvey/Sites/Odyssey3.5/OdysseyEDIJAXB/src/com/locuslive/edi/edifact/d95b/coreor/.svn/tmp/entries' to '/Users/damianharvey/Sites/Odyssey3.5/OdysseyEDIJAXB/src/com/locuslive/edi/edifact/d95b/coreor/.svn/entries' 

我正在運行OSX Snow Leopard,Eclipse 3.5,Subclipse 1.6.5。

它看起來像一個權限問題。如果我列出錯誤中的目錄,我會得到:

drwxrwxrwx 8 damianharvey staff 272 19 Nov 17:43 . 
drwxrwxrwx 16 damianharvey staff 544 21 Sep 14:53 .. 
-r--r--r-- 1 damianharvey staff 2030 21 Sep 14:53 all-wcprops 
-r--r--r-- 1 damianharvey staff 2313 21 Sep 14:53 entries 
drwxrwxrwx 2 damianharvey staff 68 21 Sep 14:53 prop-base 
drwxrwxrwx 2 damianharvey staff 68 21 Sep 14:53 props 
drwxrwxrwx 15 damianharvey staff 510 21 Sep 14:53 text-base 
drwxrwxrwx 6 damianharvey staff 204 19 Nov 17:19 tmp 

因此,我認爲這是防止這種情況的只讀權限。如果我嘗試chmod到一個非常廣泛的777:

sudo chmod 777 /Users/damianharvey/Sites/Odyssey3.5/OdysseyEDIJAXB/src/com/locuslive/edi/edifact/d95b/coreor/.svn/entries 
chmod: Unable to change file mode on /Users/damianharvey/Sites/Odyssey3.5/OdysseyEDIJAXB/src/com/locuslive/edi/edifact/d95b/coreor/.svn/entries: Operation not permitted 

任何想法?很想提交我的代碼。

很多謝謝。

回答

35

不用擔心。谷歌阿姨發現這對我

chflags -R nouchg . 

comments here

If you're changing workspaces on OS X and you import an SVN-based project into your new workspace, some of your files may have the uchg flag set. SubClipse/SVN will not be able to update this project. You will get an error:

svn: Cannot rename file

every time you try invoke svn. If you issue:

chflags -R nouchg .

at the top-level of the project directory this will clear these flags and restore SVN function.

+0

如果我能投你了一次,每次我用這個答案的時候,你可能只是給喬恩斯基特跑步了錢。 – 2011-03-28 16:01:22

+0

+1很棒,爲我工作(OSX 10.6.6) – Dori 2011-07-21 14:47:53

+0

++謝謝阿姨谷歌(和你達摩) – 2011-12-14 16:35:25