与具有大型存储库的 SVN 持续集成

发布于 2024-10-10 20:49:34 字数 436 浏览 1 评论 0原文

所以我们有一个 SVN 存储库,其中包含一个相当大的项目,第一次需要大约一个小时才能拉下来。我们已经设置了与 CruiseControl 的持续集成,并在提交时触发它。由于拉取时间较长,我们不会删除构建机器上的构建目录,而是仅发出 svn update 命令来获取最新版本。

添加、更新和删除已签入 SVN 的文件工作正常,但我们遇到的问题是在构建过程中生成文件。这些生成的文件永远不应该被签入,但我想在构建之间清除它们。

本质上,我想要一个 svn update 命令:

  1. 将目录更新到当前版本。
  2. 删除所有不受源代码控制的文件。

我只是错过了一些东西还是没有 SVN 命令?

更新: 我在一台windows机器上。我知道我可以使用 cygwin 或其他方法来完成此操作,但我很好奇是否有 SVN 或 CC.Net 功能可以实现此目的。

So we have a SVN repository which houses a rather large project that takes about an hour to pull down for the first time. We've setup continuous integration with CruiseControl and we have it triggered on commits. Because of the long pull time we don't delete the build directory on the build machine and instead just issue a svn update command to get the latest version.

The works fine on adding, updating, and removing files which have been checked into SVN, but the issue we have is that during the build process files are generated. Those generated files should never be checked in but I would like to clean them out between builds.

Essentially, I'd like a svn update command that:

  1. Updated the directory to the current version.
  2. Removes all files not under source control.

Am I just missing something or is there no SVN command for this?

Update:
I am on a windows machine. I'm aware that I could do this with cygwin or other methods, but I'm curious if there is a SVN or CC.Net feature for this.

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

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

发布评论

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

评论(2

混吃等死 2024-10-17 20:49:34

查看这篇博客文章(和评论线程),了解如何删除不在 subversion 中的文件有多种方法。如果您习惯使用 git,我认为切换到 git-svn 作为您的客户端也可能允许您处理清理工作。

Check out this blog post (and comment thread) on how to Remove files that are not in subversion for several methods. If you're comfortable using git, I think switching to git-svn as your client might also allow you to handle the cleanup.

哆啦不做梦 2024-10-17 20:49:34

您可以运行 svn update 命令,然后删除未版本化的文件,如此处。

svn status | grep '^\?' | cut -c8- | xargs rm
svn status | grep '^?' | awk '{print $2}' | xargs rm -rf

任何一个都可以。哦,也许你在 Windows 盒子上?你能澄清一下吗?

You can run the svn update command and subsequently removed the unversioned files as mentioned here.

svn status | grep '^\?' | cut -c8- | xargs rm
svn status | grep '^?' | awk '{print $2}' | xargs rm -rf

either one would work. Oh maybe you are on a windows box? Could you clarify?

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