创建没有修订历史记录的 SVN 分支

发布于 2024-12-16 16:36:54 字数 482 浏览 6 评论 0原文

我们遇到的情况是,我们必须向第三方提供对 SVN 版本的 asp.net 解决方案的访问权限。我们已经清除了 Web.config 和其他敏感数据文件,现在希望为承包商创建一个功能分支。有没有办法创建功能分支,以便只有 HEAD 修订版本可见,并且所有先前的修订历史记录都被锁定?理想情况下,我们希望有一个存储库并使用 subversion 的 TRUNK/BRANCH 功能。

替代方法

  1. 我们可以转储 ->转储过滤器->将主干的副本加载到新分支中?看起来 subversion 会认为它们是不同的存储库并使合并变得麻烦。

  2. 如果我们必须使用两个单独的存储库,使用 svnadmin dump/load 保持它们同步有多困难?

  3. 我们可以转储吗 -> 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

  1. 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.

  2. If we were to have to use two separate repositories, how difficult would it be to keep them synced using svnadmin dump/load?

  3. 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 技术交流群。

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

发布评论

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

评论(4

流绪微梦 2024-12-23 16:36:54

最简单的方法是创建分支,然后对该分支中所需的代码执行 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 an svn 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 the svn:log revision property.

不必你懂 2024-12-23 16:36:54

真正最简单的方法是

  • 为承包商创建单独的存储库
  • 将主干的 HEAD 导入到此新存储库
  • 将承包商的存储库链接到 MainRepo 使用 svn:externaks 到任何位置
  • 给承包商授权凭证> 对于他的存储库

没有历史记录,无法访问,没有合并麻烦(我想)

The really easiest way will be

  • Create separate repo for contractor
  • Import HEAD of trunk to this new repo
  • Link contractor's repo to MainRepo into any location with svn:externaks
  • Give to contractor authorization credential only for his repo

No history, no access, no troubles (I suppose) with merges

高跟鞋的旋律 2024-12-23 16:36:54

可以尝试的一个技巧:当您删除并重新添加文件时,您会破坏历史记录。

因此:

  1. 使用“svn copy”命令创建分支(以保持链接和合并功能)
  2. “svn rm”分支中的所有文件
  3. “svn导出”您的主干(现在为空)分支
  4. 可选择修改您想要的文件(例如安全原因...)
  5. 提交分支

这样我认为合并到主干就可以了。

A trick to try : when you delete and re-add a file, you break history.

So :

  1. create the branch with the "svn copy" command (to keep link and merging capabilities)
  2. "svn rm" all the files in the branch
  3. "svn export" your trunk in your (now empty) branch
  4. Optionnaly modify files you want (for security reasons...)
  5. commit the branch

This way I think merge to trunk will be OK.

不知所踪 2024-12-23 16:36:54

可以使用您的 svn conf [1] 限制访问 -

  • 创建一个分支(为您自己)
  • 提交您需要的任何更改(例如删除/编辑不共享的代码)
  • 创建另一个分支(与第三方共享)
  • 创建一个新用户在您的 passwd 中,并在您的 authz 中授予该用户对此副本的读/写访问权限。

您可以与第三方共享新分支的 url,authz 会阻止访问指定分支之外的日志,但仍然允许您在完成后合并它们的更改。

[1] 如何在 SVN 中设置访问控制?< /a>

Can restrict access using your svn conf [1] -

  • create a branch (for yourself)
  • commit any changes you need to (e.g. remove/edit code not to be shared)
  • create another branch (to share with the third party)
  • create a new user in your passwd and give read/write access to that user for this copy in your authz.

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?

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