创建没有修订历史记录的 SVN 分支
我们遇到的情况是,我们必须向第三方提供对 SVN 版本的 asp.net 解决方案的访问权限。我们已经清除了 Web.config 和其他敏感数据文件,现在希望为承包商创建一个功能分支。有没有办法创建功能分支,以便只有 HEAD 修订版本可见,并且所有先前的修订历史记录都被锁定?理想情况下,我们希望有一个存储库并使用 subversion 的 TRUNK/BRANCH 功能。
替代方法
我们可以转储 ->转储过滤器->将主干的副本加载到新分支中?看起来 subversion 会认为它们是不同的存储库并使合并变得麻烦。
如果我们必须使用两个单独的存储库,使用 svnadmin dump/load 保持它们同步有多困难?
我们可以转储吗 -> dumpfilter(仅排除敏感文件)->加载到一个新的存储库,切换到该存储库,然后从那里创建分支?
任何帮助将不胜感激。
We have a situation where we have to give a third party access to an asp.net solution versioned with SVN. We have scrubbed Web.config and other files of sensitive data and would now like to create a feature branch for the contractor. Is there a way to create the feature branch so that only the HEAD revision is visible and all prior revision history is locked down? Ideally, we would like to have a single repository and use the TRUNK/BRANCH features of subversion.
Alternate Methods
Could we dump -> dumpfilter -> load a copy of the trunk into a new branch? It seems like subversion would consider them different repositories and make merging troublesome.
If we were to have to use two separate repositories, how difficult would it be to keep them synced using svnadmin dump/load?
Could we dump -> dumpfilter (exclude just the sensitive files) -> load into a new repository, switch to that, and create the branch from there?
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
最简单的方法是创建分支,然后对该分支中所需的代码执行
svn export
操作,然后执行svn add
操作。这样,分支中的文件与其他地方的文件没有连接。当然,您不能使用合并跟踪来在该分支和其他分支之间进行合并。
您可以设置 Apache httpd 安全性和 svnserve 安全性来限制开发人员只能看到此分支。为什么不这样做呢?
您可能想尝试一下,看看 svn log 是否显示其他分支或主干上发生的更改。即使确实如此,这也可能没问题,因为日志中可能没有专有信息。而且,如果有的话,可以通过更改 svn:log 修订版属性轻松清除它。
The easiest way is to create the branch, then do an
svn export
of the code you want in that branch, then do ansvn add
. That way, the files in the branch have no connection to the files elsewhere.Of course you can't use merge tracking to do merges between this branch and your other branches.
You can setup Apache httpd security and
svnserve
security to limit the developer to only seeing this branch. Why not do that?You might want to try that, and see if
svn log
shows changes that took place on other branches or the trunk. Even if it does, this might be okay because there might not be proprietary information in the log. And, if there is, it can easily be scrubbed by changing thesvn:log
revision property.真正最简单的方法是
没有历史记录,无法访问,没有合并麻烦(我想)
The really easiest way will be
No history, no access, no troubles (I suppose) with merges
可以尝试的一个技巧:当您删除并重新添加文件时,您会破坏历史记录。
因此:
这样我认为合并到主干就可以了。
A trick to try : when you delete and re-add a file, you break history.
So :
This way I think merge to trunk will be OK.
可以使用您的 svn conf [1] 限制访问 -
您可以与第三方共享新分支的 url,authz 会阻止访问指定分支之外的日志,但仍然允许您在完成后合并它们的更改。
[1] 如何在 SVN 中设置访问控制?< /a>
Can restrict access using your svn conf [1] -
You can share the url of the new branch with the third party, authz prevents access to the log outside the branch specified but still lets you merge their changes in when they are finished.
[1] How do I set up access control in SVN?