忽略对 SVN 中版本化文件夹的所有更改,而不从 repo 中删除

问题描述:

我有一个基于框架的项目,我正在使用 SVN 进行版本控制.我有一个用于开发的本地工作副本,一个在登台机器上检出最新 RC 标签的工作副本,以及在我的生产服务器上检出的最新稳定标签.

I have a framework based project that I'm using SVN to version control. I have a local working copy I use for development, a working copy on the staging machine that's checked out the latest RC tag, and the latest stable tag checked out on my production server.

当我将标签推广到直播时,我只需在直播盒上切换"工作副本.

When I'm promoting a tag to live, I simply "switch" the working copy on the live box.

该框架制作了大量临时文件,并在我开发时对其内部进行了更改.我不希望这些更改污染存储库,因为其中一些更改是特定于环境的,并且在暂存和生产工作副本上会有所不同.

The framework makes lots of temp files, and makes changes to its internals as I'm developing. I don't want these changes to pollute the repo, as some of them are environment specific, and will be different on the staging and production working copies.

我不能忽略"这些文件 &文件夹,因为它们已经受版本控制,并且在我切换到任一远程设备上的新标签时需要使用.

I can't "ignore" the files & folders, as they're already version controlled, and are needed when I switch to a new tag on either of my remote boxes.

有没有办法告诉 subversion 将文件/文件夹的原始提交版本保留在 repo 中,但忽略任何后续更改?

Is there a way to tell subversion to keep the originally committed version of a file/folder in the repo, but to ignore any subsequent changes?

我终于找到了解决方案 - 使用 svn:externals 将有问题的文件夹修复到较早的版本,而没有所有临时文件.

I finally got somewhere with this - using svn:externals to fix the offending folders to an earlier revision, without all the temp files in there.

希望这对某人有所帮助.

Hope this helps someone.