使用 Mercurial 必须使用 Mercurial Server 吗?

发布于 2024-12-06 12:52:51 字数 625 浏览 0 评论 0原文

我正在尝试为我们的团队选择一个版本控制软件,但我之前没有太多经验。经过搜索和谷歌搜索后,似乎 Mercurial 是一个不错的尝试。然而,我对一些有关它的一般信息有点困惑。基本上,我们的团队只有 5 个人,我们都连接到一台用于存储存储库的服务器计算机。服务器是Redhat Linux系统。我们可能会使用很多集中式工作流程。因为我喜欢本地提交的想法,所以我还是更喜欢DVCS类软件。现在我正在尝试安装 Mercurial。这是我的问题。

1)用于存储库的服务器是否总是需要安装软件“mercurial-server”?或者这取决于它使用什么样的工作流程?换句话说,如果作品没有集中式工作流程,是不是可以通过“mercurial client”来安装服务器呢?

我对“mercurial-server”这个术语感到困惑。或者这意味着安装在服务器上的 Mercurial 始终称为“mercurial 服务器”,无论它是否集中式都重要。另外,因为我们都在该服务器上工作,这是否意味着只需要安装一份 Mercurial 副本?我们都有自己的用户目录,例如 /home/Cassie、/home/John、... 和 /home/Joe。

2)SSH是必须的吗?或者取决于用户和服务器之间的连接是什么样的?既然我们都在服务器上工作,那么 SSH 就不需要了,对吗?

非常感谢,

I am trying to pick a version control software for our team but I don't have much experience for it before. After searching and googling, it seems Mercurial is a good try. However, I am a little bit confused about some general information about it. Basically, our team only have 5 people and we all connect to a server machine which will be used to store the repositories. The server is a Redhat Linux system. We probably use a lot of the centralized workflow. Because I like the local commit idea, I still prefer the DVCS kind software. Now I am trying to install mercurial. Here are my questions.

1) Does the server used for repositories always need to be installed the software "mercurial-server "? Or it depends on what kind of workflow it uses ? In other words, is it true if there is no centralized workflow used for works, then the server can be installed by "mercurial client" ?

I am confused about the term "mercurial-server". Or it means the mercurial installed on the server is always called "mercurial server" and it does matter if it is centralized or not. In addition, because we all work on that server, does it mean only one copy of mercurial is required to install there ? We all have our own user directory such as /home/Cassie, /home/John,... and /home/Joe.

2) Is SSH a must ? Or it depends on what kind of connection between users and the server ? So since we all work in the server, the SSH is not required right ?

Thank you very much,

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

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

发布评论

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

评论(3

吾家有女初长成 2024-12-13 12:52:51

有两种东西可以称为“mercurial 服务器”。

其中一个只是一种社会惯例,即“共享驱动器上的存储库 X 是我们的公共存储库”。您可以安全地推送和拉取已安装的存储库,并将其用作开发的公共“主干”。

第二个可能是允许 Mercurial 远程连接的特定软件。有许多选项用于您自己进行设置,以及其他远程托管

查看第一个链接,了解不同连接选项的列表。但作为问题 2 的具体答案:不,您不需要使用 SSH,但如果您处于使用 SSH 的环境中,它通常是最简单的选择。

您可能想要使用的术语是“远程存储库”,而不是“mercurial 服务器”。该术语用于描述推/拉/克隆/传入/传出/其他我忘记的命令的“其他存储库”(您不从中执行命令的存储库)。远程存储库可以是同一磁盘上的另一个存储库,也可以是网络上的某个存储库。

There are two things that can be called a "mercurial server".

One is simply a social convention that "repository X on the shared drive is our common repository". You can safely push and pull to that mounted repository and use it as a common "trunk" for your development.

A second might be particular software that allows mercurial to connect remotely. There are many options for setting this up yourself, as well as options for other remote hosting.

Take a look at the first link for a list of the different connection options. But as a specific answer to #2: No, you don't need to use SSH, but it's often the simplest option if you're in an environment using it anyways.

The term that you probably want to use, rather than "mercurial server", is "remote repository". This term is used to describe the "other repository" (the one you're not executing the command from) for push/pull/clone/incoming/outgoing/others-that-i'm-forgetting commands. The remote repository can be either another repository on the same disk, or something over a network.

雪化雨蝶 2024-12-13 12:52:51

通常,您使用一个共享存储库在不同开发人员之间共享代码。虽然您在技术上不需要它,但它的优点是当新软件只有一个位置时更容易同步。

在最简单的情况下,这可以是简单文件共享上的存储库,其中可以进行文件锁定(NFS 或 SMB),并且每个开发人员都具有写入访问权限。在这种情况下,不需要在服务器上安装mercurial,但有缺点:

  • 每个开发人员都必须安装一个mercurial版本,它可以处理共享上的repo版本(例如,当共享上的repo是使用 Mercurial 1.9 创建,使用 1.3 的开发人员无法访问此存储库)
  • 每个开发人员都可以对共享存储库发出破坏性操作,包括删除整个存储库。
  • 您无法在此类存储库上可靠地运行挂钩,因为挂钩是在开发人员计算机上执行的,而不是在服务器上执行的,

我建议使用 http 或 ssh 方法。 (我没有考虑 http-static 方法,因为您无法推送到 http-static 路径),并获得以下优点:

  • 为此,您需要在服务器上安装Mercurial 服务器不需要与客户端相同,因为 Mercurial 使用与版本无关的有线协议,因此
  • 您无法通过这些协议执行破坏性操作(您只能将新修订版附加到远程存储库,但决不能删除其中任何修订版)

http 和之间的决定ssh 取决于您本地的网络环境。 http 的优点是它可以绕过许多公司防火墙,但是当您想通过 http 将内容推送回服务器(或者不希望每个人都看到内容)时,您需要注意安全身份验证。另一方面,ssh 的缺点是您可能需要保护服务器,以便客户端无法在那里运行任意程序(这取决于客户端的可信度)。

Typically you use one shared repository to share the code between different developers. While you don't need it technically, it has the advantage that it is easier to synchronize when there is a single spot for the fresh software.

In the simplest case this can be a repository on a simple file share where file locking is possible (NFS or SMB), where each developer has write access. In this scenario there is no need to have mercurial installed on the server, but there are drawbacks:

  • Every developer must have a mercurial version installed, which can handle the repo version on the share (as an example, when the repo on the share is created with mercurial 1.9, a developer with 1.3 can't access this repo)
  • Every developer can issue destructive operations on the shared repo, including the deletion of the whole repo.
  • You can't reliably run hooks on such a repo, since the hooks are executed on the developer machines, and not on the server

I suggest to use the http or ssh method. You need to have mercurial installed on the server for this (I'm not taking the http-static method into account, since you can't push into a http-static path), and get the following advantages:

  • the mercurial version on the server does not need to be the same as the clients, since mercurial uses a version-independent wire protocol
  • you can't perform destructive operations via these protocols (you can only append new revisions to a remote repo, but never remove any of them)

The decision between http and ssh depends on you local network environment. http has the advantage that it bypasses many corporate firewalls, but you need to take care about secure authentication when you want to push stuff over http back into the server (or don't want everybody to see the content). On the other hand ssh has the drawback that you might need to secure the server, so that the clients can't run arbitrary programs there (it depends on how trustworthy your clients are).

柠北森屋 2024-12-13 12:52:51

我赞同 Rudi 的答案,即您应该使用 http 或 ssh 访问主存储库(我们在工作中使用 http)。

我想解决您有关“mercurial-server”的问题。

基本的 Mercurial 软件确实提供了三种服务器模式:

  1. 使用 hgserve;它提供单个存储库,我认为它更多地用于快速破解(例如,当主服务器关闭时,您需要从同事那里获取一些更改)。
  2. 使用hgwebdir.cgi;这是一个 cgi 脚本,可以与 Apache 等 HTTP 服务器一起使用;它可以为多个存储库提供服务。
  3. 使用 ssh(安全外壳)访问;我对此了解不多,但我相信它比 hgwebdir 变体更难设置

。还有一个名为“mercurial-server”的单独软件包。这是由另一家公司提供的;其主页是 http://www.lshift.net/mercurial-server.html 。据我所知,这是选项 3(mercurial ssh 服务器)的管理界面。

所以,不,你不需要安装 Mercurial-server; Mercurial 包已经提供了一个服务器。

I second Rudi's answer that you should use http or ssh access to the main repository (we use http at work).

I want to address your question about "mercurial-server".

The basic Mercurial software does offer three server modes:

  1. Using hg serve; this serves a single repository, and I think it's more used for quick hacks (when the main server is down, and you need to pull some changes from a colleague, for example).
  2. Using hgwebdir.cgi; this is a cgi script that can be used with an HTTP server such as Apache; it can serve multiple repositories.
  3. Using ssh (Secure Shell) access; I don't know much about it, but I believe that it is more difficult to set up than the hgwebdir variant

There is also a separate software package called "mercurial-server". This is provided by a different company; its homepage is http://www.lshift.net/mercurial-server.html. As far as I can tell, this is a management interface for option 3, the mercurial ssh server.

So, no, you don't need to have mercurial-server installed; the mercurial package already provides a server.

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