定期将修订版本从一个 SVN 存储库复制到另一个活动 SVN 存储库

发布于 2024-07-16 13:47:54 字数 647 浏览 12 评论 0 原文

我的公司维护两个SVN存储库,存储库1和存储库2:

  1. 该存储库中有多个项目,并且仅由公司内部的开发人员访问。 访问通过 HTTPS 进行,身份验证通过 Windows 域进行。
  2. 该存储库中有一个项目,可供公司内的开发人员以及我们客户的开发人员访问。 访问是通过 svn:// 进行的,身份验证是通过 passwd 文件进行的。

我们在存储库 1 的文件夹中有一些代码,我们希望将其下载给存储库 2 的用户。显而易见的答案是使用 SVN 外部,但据我所知,这需要客户端的开发人员拥有帐户我们的领域,而我们的 IT 人员不喜欢这样。

因此,我能看到的唯一解决方案是某种 cron 作业,它定期运行以将必要的文件从存储库 1 复制到存储库 2。我找到了一个名为 Tailor 声称可以做我需要的事情,但到目前为止我还没有设法让它正常工作。

在我花更多时间尝试让 Tailor 工作之前,有人对另一种方法有任何建议吗? 我的最后一招是敲一个程序来帮我做这件事,这应该不会太难,但最好使用现有的应用程序(如果有的话)!

预先感谢您的任何帮助/指示!

富有的

My company maintains two SVN repositories, Repository 1 and Repository 2:

  1. This repository has multiple projects in it, and is only accessed by the developers within the company. Access is through HTTPS and authentication is through the Windows domain.
  2. This repository has a single project in it, and is accessed by the developers within the company, and our client's developers. Access is through svn:// and authentication is through the passwd file.

We have some code in a folder in Repository 1 that we would like to be downloaded to users of Repository 2. The obvious answer is to use SVN Externals, but as far as I can see, that would need the client's developers to have accounts on our domain, and our IT people don't like that.

Therefore, the only solution I can see is some kind of cron job that runs periodically to copy the necessary files from Repository 1 to 2. I've found a tool called Tailor which claims to do what I need, but so far I've not managed to get it to work correctly.

Before I spend more time trying to get Tailor to work, does anyone have any suggestions of another approach? My last resort is to knock up a program to do it for me, which shouldn't be too hard, but it's always best to use an existing app if there is one!

Thanks in advance for any help/pointers!

Rich

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

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

发布评论

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

评论(4

山有枢 2024-07-23 13:47:54

如果 SVN 外部可以工作,但唯一的障碍是访问权限,那么为什么不克隆存储库并将外部指向该存储库呢?

SVN 现在对镜像有很好的支持:

https://www.opends.org/wiki/page/ MirroringASubversionRepository

您可以使用您喜欢的任何身份验证方案锁定镜像存储库,例如匿名只读访问。

但是,您需要确保更新镜像的唯一方法是 svnsync 命令 - 存储库 2 的用户将无法将更改提交回存储库 1。

此页面有一些非常有用的信息:

http://svn.collab.net/repos/svn/trunk/notes/svnsync。文本

If SVN externals would work, but the only stumbling block is access rights, then why not make a clone of the repository and point the externals to that?

SVN now has good support for mirroring:

https://www.opends.org/wiki/page/MirroringASubversionRepository

You can lock down the mirror repository using any authentication scheme you like, for example, anonymous read-only access.

However, you need to ensure that the only thing that updates the mirror is the svn sync command - the users of repository 2 won't be able to commit changes back to repository 1.

This page has some very useful information:

http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt

心病无药医 2024-07-23 13:47:54

我发现您需要对两个存储库进行更改。

您也许可以使用相同的 svnsync 想法来构建 write -通过代理

使用此功能,镜像存储库将写入请求传递回主代理。 现在我不确定身份验证会发生什么,但可能值得在这里进行调查。

也可以查看此信息

I see you need to make changes from both repositories.

You might be able to use the same svnsync idea to build a write-through proxy.

Using this, the mirror repository passes write requests back to the master proxy. Now I'm not sure at this point what happens with authentication, but it's probably worth investigating here.

Might also look at this info.

云仙小弟 2024-07-23 13:47:54

您是否需要让外部开发人员更改存储库 2 中文件夹中的代码,如果不需要,您可能根本不需要使用 SVN。

一般来说,拥有两个带有相同代码的 SVN 存储库会造成混乱。

其他选项

  • 如果您需要外部开发人员
    编辑存储库 2 中的文件,
    你可以没有外部设备吗
    走另一条路,所以repository1
    有一个外部定义
    存储库。
  • 巡视您的 IT 人员
    将所有代码放在存储库中。
  • 使用 GIT。

Do you need to have the external developers change the code in the folder in repository 2, if not you may not need to use SVN at all.

In general, having two repositories with SVN with the same code in is going to be confusing.

Other options

  • If you need the external developers
    to edit the files in repository 2,
    could you not have the externals
    going the other way, so repository1
    has an externals definition to
    repository.
  • Go round your IT people
    by putting all the code on repository.
  • Use GIT.
没︽人懂的悲伤 2024-07-23 13:47:54

SVNReplicate,可以对其进行自定义以使用单个项目,但这似乎是 分布式 VCS 应该更合适的情况。

There is SVNReplicate, which maybe could be customized to work with a single project, but this seems a case where a distributed VCS should be more appropiate.

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