尝试忽略 svn 中的文件

发布于 2024-12-03 16:01:55 字数 823 浏览 1 评论 0原文

我们使用maven和svn。导致此错误的原因是错误地将目标目录签入到 SVN。我从存储库中删除了目标:

svn delete -m "removing target folder" https://svn/svn/playground/denizatak/lrms-1.5-0_release_7/target/

Committed revision 19955.

并添加了有关目标的忽略属性:

svn proplist -v
Properties on '.':
  svn:ignore : target

但是,当我尝试提交项目时,我收到此消息:

svn commit -m "licensing latest version - without target"
svn: Commit failed (details follow):
svn: Directory '/project/target/.svn' containing working copy admin area is missing

当我分别检查目标文件的状态时,我收到此消息:

svn stat target
svn: Directory 'target/.svn' containing working copy admin area is missing

项目的状态是

svn st
~      target
M      some files
M      pom.xml

:有人对这个案子有什么建议吗?

We use maven and svn. It was an mistaken checkin of target directory to SVN that cause this error. I removed target from the repository:

svn delete -m "removing target folder" https://svn/svn/playground/denizatak/lrms-1.5-0_release_7/target/

Committed revision 19955.

and add ignore property regarding target:

svn proplist -v
Properties on '.':
  svn:ignore : target

However when I try to commit the project I got this message:

svn commit -m "licensing latest version - without target"
svn: Commit failed (details follow):
svn: Directory '/project/target/.svn' containing working copy admin area is missing

When I check the status of the target file separetly I got this message:

svn stat target
svn: Directory 'target/.svn' containing working copy admin area is missing

The status of the project is:

svn st
~      target
M      some files
M      pom.xml

Does anyone have any suggestion about this case?

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

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

发布评论

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

评论(2

平安喜乐 2024-12-10 16:01:55

您是否尝试从项目文件夹中删除目标目录?作为预防措施,您可以先将其移到其他地方。

Subversion 可能会因为目标似乎是工作副本的一部分(它有一个 .svn 子目录)而感到困惑,但既不是存储库中当前目录的一部分(您删除了它),也没有定义为 svn:externals 。

Did you try just removing the target directory from your project folder? As a precaution you could first move it somewhere else.

Subversion might just be confused by the fact that target appears to be part of a working copy (it has a .svn subdirectory) but is neither part of the current directory in your repository (you deleted it) nor is it defined as svn:externals.

往日 2024-12-10 16:01:55

您似乎已损坏或删除了 .svn 目录,其中包含有关存储库和本地目录之间的链接的信息。

首先尝试使用“svn clean”来尝试重建它,也可能使用“svn update”来从存储库中获取详细信息。如果失败,最简单的方法(也是让我最有信心防止出现问题的方法)是签出新的工作副本,然后将更改的文件(不是 .svn 目录)复制到那里。然后签到。

我不确定 svn st 结果上的 ~ ,这意味着对象已更改类型(例如文件已成为目录或类似文件),我希望它显示为 D 表示已删除,尽管我想你已向工作副本项目添加了一个属性,该属性不再是源代码管理的一部分 - 正是这一点导致了混乱。我会将您的问题发布到 svn users mailing list 看看这种工作流程是否有效被称为错误的东西。

you appear to have corrupted or deleted your .svn directory that contains information about the link between the repo and the local directory.

First try a 'svn clean' to try and rebuild this, possibly 'svn update' too to fetch the details from the repo. If this fails, the easiest way (and the one that gives me most confidence against things going wrong) is to checkout a new working copy, then copy your changed files (NOT the .svn directories) across to there. Then checkin.

I'm not sure about the ~ on the svn st result, it means the object was changed type (eg a file has become a directory or similar), I would have expected it to show with a D for deleted, though I imagine you've added a property to a working-copy item that's no longer part of source control - and it's this that's causing confusion. I would post your question to the svn users mailing list to see if this kind of workflow is something that is known as a bug.

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