在共享环境中系统范围内的 Mercurial 安装是否足够?

发布于 2024-12-06 17:37:00 字数 848 浏览 0 评论 0原文

我正在学习如何在我们的团队系统上安装 Mercurial,但我的经验不足,无法做出某些决定。

对于我们的团队来说,我们有一台服务器计算机用作存储库。每个团队成员也有她/他自己的安装了 Linux RedHat 的机器。但是,我们不在本地终端上执行任何操作,而是在服务器上执行所有操作。每个成员在服务器上都有一个用户目录,例如 /home/Cassie、/home/john...,我们保存所有代码并在那里工作。当我们打开本地终端时,GNOME 系统会显示服务器上而不是本地计算机上的个人文件。每当每个人单击桌面上的终端应用程序时,它都会连接到她自己的主目录。这样,我们就不需要使用SSH命令来连接服务器了。就像学校的多用户系统一样。每个人都有一个用户帐户,她登录自己的帐户做自己的工作。我希望我可以在该服务器上安装一个共享存储库,每个人都可以在那里执行推送、拉取等所有类型的命令。

1)既然我们使用共享环境,是否意味着我只需要在服务器上安装Mercurial就足以让每个人执行“commit”,“push”,“pull”等命令?

2) 通过仅安装系统范围的 Mercurial,是否会消除进行本地提交的能力?如果我想让大家仍然拥有“本地提交”的能力,应该怎么做呢?

3)我在网上搜索过。有人提到,对于共享网络服务器,如果任何两个用户试图同时访问同一个文件,则不可能对其进行锁定。这是否暗示了我的处境?

总之,我们在服务器上完成所有工作。我希望找到一个计划,让 Mercurial 控制每个人共享的存储库,同时每个人仍然具有本地提交能力,并且如果任何两个用户尝试同时访问一个文件,存储库仍然具有一定的锁定保护。如果这种情况可行,我可以只在服务器上安装 Mercurial 还是需要为服务器和用户计算机安装 Mercurial?如果这种情况不可能,有人可以建议我一个为我们的系统进行版本控制的计划吗?

I am learning how I can install Mercurial on our team system, but I am not experienced enough to make some decision.

For our team, we have a server machine used as a repository. Every team member also has her/his own Linux RedHat installed machine. However, we do not do anything on our local terminals and we do everything on the server. Every member has a user directory on the server such as /home/Cassie, /home/john, ... and we save all our code and work there. When we turn on the local terminals, the GNOME system shows our personal files on the server not the local machine. Whenever everyone click the terminal application on desktop, it connects to her own home directory. Thus, we do not need to use SSH command to connect to the server. It is like the school multi-users system. Everyone has a user account and she logs into her own account to do her own work. I hope I can install a shared repository on that server and every one can do push, pull, etc. all kind of commands there.

1) Since we use a shared environment, does it mean that I need to install Mercurial on only the server and that is enough for everyone to do "commit", "push", "pull", etc. commands?

2) By installing only system-wide Mercurial, does it eliminate the ability to do local commit? If I would like to let everyone still have the "local commit" ability, how should I do it?

3) I have searched online. Some people mentioned that for a shared network server, it is impossible to have locks for any two users if they are trying to access the same file at the same time. Does it imply my situation?

In sum, we do all the work on the server. I hope to find a plan to have Mercurial control on a repository shared by everyone when everyone still has local commit ability and the repository still has some locks protection if any two users try to access a file at the same time. If this scenario is feasible, can I just install the Mercurial on the server or I need to install Mercurial for both servers and users machines? If it is impossible for the scenario, would someone please suggest me a plan to have version control for our system?

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

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

发布评论

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

评论(1

ぶ宁プ宁ぶ 2024-12-13 17:37:00

1)既然我们使用共享环境,是否意味着我只需要在服务器上安装Mercurial,每个人都可以执行“commit”,“push”,“pull”..等命令?

如果您的用户登录服务器上的 shell 来完成他们的工作,那么只在服务器上安装 Mercurial 就足够了。

2) 通过仅安装系统范围的 Mercurial,是否会消除进行本地提交的能力?如果我想让大家仍然拥有“本地提交”的能力,我该怎么做?

您的用户可能会从共享的“根”存储库检出到他们自己的主目录中,以便处理代码。他们将在其主目录中拥有存储库的“本地”副本,并将推送到共享根存储库中。

3)我在网上搜索过。有人提到,对于共享网络服务器,如果任何两个用户试图同时访问同一个文件,则不可能对其进行锁定。是不是暗示了我的处境?

只要您的用户在他们自己的存储库本地副本中工作,他们就不会相互干扰。唯一可能出现冲突的时候是提交回共享根存储库时——在这种情况下,用户需要合并他们的更改并解决任何冲突。

我建议仔细阅读 Joel Spolsky 出色的 Hg Init 教程,以便更好地理解 Mercurial 如何处理“中央”和“本地” ”副本。

1) Since we use a shared environment, does it mean that I just need to install the Mercurial on the server and it is enough for everyone to do "commit","push","pull"..etc commands ?

If your users are logging into a shell on the server in order to do their work, then yes it is sufficient to have Mercurial installed only on the server.

2) By installing only system-wide Mercurial, does it eliminate the ability to do local commit ? If I would like to let everyone still have the "local commit" ability, how should I do it ?

Your users will presumably checkout from a shared "root" repository into their own home directory in order to work on the code. They will have a "local" copy of the repo in their home directory and will push into the shared root repository.

3) I have searched online. Some people mentioned that for a shared network server, it is impossible to have locks for any two users if they are trying to access the same file at the same time. Does it imply my situation ?

As long as your users are working within their own local copies of the repo, they will not interfere with one another. The only time a conflict may arise is when committing back to the shared root repository -- in which case the user will need to merge their changes and resolve any conflicts.

I would recommend reading carefully through Joel Spolsky's excellent Hg Init tutorial for a better understanding of how Mercurial handles "central" and "local" copies.

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