Subclipse 无法重命名文件 (OS X)

发布于 2024-08-11 18:29:02 字数 2105 浏览 6 评论 0原文

我无法在 Eclipse 项目上执行任何 Subversion 操作,因为 Subclipse 无法重命名文件。错误是:

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

有什么想法吗?很想提交我的代码。

非常感谢。

I can't perform any Subversion operations on my Eclipse project as Subclipse can't rename a file. The error is:

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'

I'm running OSX Snow Leopard, Eclipse 3.5, Subclipse 1.6.5.

It looks like a permissions problem. If I list the directories in the error I get:

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

So I assume that it's the read-only permissions that is preventing this. If I try to chmod this to a very broad 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

Any ideas? Would quite like to commit my code.

Many Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苏璃陌 2024-08-18 18:29:02

不用担心。 Google 阿姨帮我找到了

chflags -R nouchg .

评论

如果您要更改 OS X 上的工作区
然后导入一个基于 SVN 的项目
进入你的新工作区,你的一些
文件可能设置了 uchg 标志。
SubClipse/SVN 将无法
更新这个项目。您将得到一个
错误:

svn:无法重命名文件

每次你尝试调用 svn.如果你
问题:

chflags -R nouchg 。

在项目的顶层
目录这将清除这些标志
并恢复SVN功能。

No worries. Aunty Google found it for me

chflags -R nouchg .

From the 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文