如何为 Mercurial 最好地配置一个中央存储库/多个中央存储库?

发布于 2024-08-31 06:58:05 字数 653 浏览 5 评论 0原文

我是 Mercurial 的新手,并试图弄清楚它是否可以取代 SVN。与我一起工作的每个人都使用过 SVN、CVS 和 VSS(颤抖),所以这可能是一个相当大的变化。在阅读了它的合并和分支功能后,我非常感兴趣,但有一些保留。

我们目前使用 SVN,并拥有一个中央存储库。根据我的阅读,使用 Mercurial 时似乎没有一个适用于所有项目的中央存储库。注意:我们将每个项目视为一组单独的逻辑代码或 Visual Studio 解决方案。它自行运行。

我们的一个中央 SVN 存储库中有大约 60 个独立的项目。在阅读了 Mercurial 后,我觉得我必须为服务器上的每个项目创建 60 个独立的中央存储库。问题#1:我应该为每个项目创建一个存储库吗?

如果是,那么我担心配置和托管 60 台独立的中央 Mercurial 服务器。我开始认为我可以配置一个文件,但似乎每个存储库都必须使用“C:...\MyRepository.hg\hgrc”文件(Windows 安装)单独配置。我似乎还必须在不同的端口上运行 60 台服务器(> hgserve)。问题#2:如果问题 1 的答案是肯定的,那么每个项目都应该有一个中央存储库,那么人们如何管理多个存储库呢?

最后,我还没有考虑将所有历史记录和更改从一个 SVN 存储库移动到一堆单独的 Mercurial 存储库,但我会感谢完成此操作的人(或者如果可能的话)的任何评论。

I am new to Mercurial and trying to figure out if it could replace SVN. Everyone I work with has used SVN, CVS and VSS (shiver), so this could be quite a large change. I have been very interested after reading about its merge and branch capability, but have a few reservations.

We are currently on SVN, and have one central repository. From my reading, it seems as though there is no ONE central repository for all projects when using Mercurial. NOTE: We consider each project a separate logical set of code, or a Visual Studio Solution. It runs on its own.

We have around 60 separate projects in our one central SVN repository. After reading about Mercurial it seems to me that I have to create 60 separate central repositories for each one of these projects on the server. QUESTION #1: Should I create a single repository for each project?

If yes, then I am worried about configuring and hosting 60 separate central Mercurial servers. I started thinking I could configure one file, but it seems as if each repository must be individually configured using the “C:...\MyRepository.hg\hgrc” file (Windows install). It also seems as I have to run 60 servers (>hg serve), I would assume on different ports. QUESTION #2: If the answer to question 1 is yes, there should be a single central repository for each project, then how have people managed many multiple repositories?

Finally, I haven’t looked into moving all history and changes from one SVN repository to a bunch of separate Mercurial repositories, but would appreciate any comments from someone who has done this (or if it is even possible).

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

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

发布评论

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

评论(4

一生独一 2024-09-07 06:58:05

Mercurial 很好地支持“中央存储库”,但它是按照惯例而不是命令来实现的。

您只需运行一个服务器即可运行所有 60 个存储库,并且您不会使用 hgserve 来实现它。相反,您可以从发布选项中选择一种生产质量方法。您可能会根据您的喜好在 Apache、Nginx 或 IIS 后面运行 hgwebdir

运行后,您可以在存储库目录中使用 hg inithg clone 创建新的存储库。在以前的雇主中,我们有五个产品,每个产品都有一个“中央”存储库,每个产品都有十到二十个克隆,用于不同的团队和功能,所有产品都在一台服务器上运行。中央存储库决定“什么是官方的”,但您会发现非官方功能的临时存储库一直在涌现。

hgserve 供两个开发人员快速交付一些变更集,但发布的存储库需要更多的脚手架。

Mercurial supports "central repositories" just fine, but it does them by convention rather than fiat.

You need run only a single server to run all sixty repositories, and you wouldn't use hg serve for it. Instead you pick one of the production-quality methods from among the publishing options. Likely you'll run hgwebdir behind Apache, Nginx, or IIS depending on your preferences.

Once that's running you can create new repsitories with hg init or hg clone within your repositories directory. At a previous employer we had five products, with a "central" repository for each, and ten to twenty clones of each for various teams and features, all running in a single server. The central repo determines "what's official" but you'll find impromptu repos for unofficial features springing up all the time.

hg serve is for two devs to hand off some changesets in a hurry, but published repos require a little more scaffolding.

少女情怀诗 2024-09-07 06:58:05

您将为每个项目创建 1 个中央存储库。如果我是您,我会考虑通过 Kiln 托管。它围绕 Mercurial 封装了非常好的审查工具和漂亮的 Web 界面,并具有无限的存储库和存储空间。他们会为您处理所有令人讨厌的托管和备份问题。我还强烈推荐 Joel 的 Mercurial 教程

You will create 1 central repo per project. If I were you, I would think about hosting via Kiln. It wraps very good review tools and a nice web interface around Mercurial with unlimited repositories and storage. They take care of all the nasty bits of hosting and backing up for you. I would also highly recommend Joel's Mercurial tutorial.

月光色 2024-09-07 06:58:05

如果您正在寻找自托管的东西,请查看 http://rhodecode.org 它比纯粹的功能强大得多HG网。它就像一个自托管的小位桶。

If you're looking for something self hosted, take a look at http://rhodecode.org it's much more powerful than pure hgweb. It is like a small bitbucket just self hosted.

北恋 2024-09-07 06:58:05

以最简单的方式,您将需要 60 个中央“存储库”,所有这些都可以使用一个内容/Web 服务器来提供服务。每个存储库都可以被视为一个目录,其路径来自服务器容器的根目录。

想想 bitbucketgithub 。它们在一台服务器(或者很可能是一个服务器场)下为数千个存储库提供服务,但它们彼此独立,这与 SVN 不同,SVN 中的所有内容都在一个巨大的存储库下并共享修订增量。

In the simplest manner, you would need 60 central "repositories", all of which can be served using one content/web server. Each repository can be treated as a directory with a path from the root of the server container.

Think of bitbucket or github. They serve thousands of repositories under one server (or most likely one server farm), yet they are each independent of each other, unlike SVN where everything is under one giant repository and shares revision increments.

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