本文介绍了将Mercurial存储库放在共享的网络驱动器中是个好主意吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们是一个由3个开发人员组成的小组(老板,我和另一个主要在远程工作的开发人员),我的任务是为Mercurial HG设置存储库服务器.

we are small team of 3 developers (Boss, me and another developer working mostly remote), and I am tasked to setup a repository server for Mercurial HG.

似乎我可以简单地将集中式存储库放在共享的网络驱动器上.这将非常容易设置,但是似乎有一个风险,我们每个人都可能滥用直接使用/修改源存储库的便利性.这就是为什么我正在考虑使用HgWebdir服务器作为控制对中央存储库访问的方式.因此,不建议直接访问中央源存储库,但是为了以防万一,共享驱动器将位于此处.

It seems like I can simply put our centralized repository on a shared network drive. It will extremely easy to setup, but seems like there is a risk that any one of us could abuse the convenient of working/modify the source repository directly. That is why I am thinking about using HgWebdir server as a way to control access to central repository. So directly access to the central source repository is not encouraged, but the shared drive will be here just in case.

我想这是定义我们内部版本控制程序的问题,而不是真正的版本控制问题,但我仍然要提出这个问题.由于我不具备足够的经验来做出决定,因此,如果我不能100%地确定自己的理由是有效的,那么我可能很难强制其他人使用版本控制系统开发人员.

I guess it is a question of defined our in-house version-control procedure, not a really version-control question, but I am still go ahead and ask the question. As I don't feel I am experienced enough to make the decision, and if I am not 100% sure that my reason and means a valid, it is probably hard for me to enforce the way version-control system should be used by other developers.

我可以看到与版本控制软件一起使用的共享文件夹上存在潜在问题.但是,有人想解释一下当推送到共享文件夹时幕后发生了什么吗?我的理解是共享驱动器本质上是共享链接/快捷方式,因此对于共享驱动器,本地计算机上的Mercurial仅持有该链接的锁,但事实是每个用户计算机可能拥有不同的Mercurial实例来保存该链接.链接的锁,而服务器的Mercurial实例将在物理驱动器上保留其自己的链接.我可以看到它很复杂,但是它将如何失败?我能理解结论,但我自己无法将事实与结论联系起来

I can see that there are potential issues on shared folder working with Version-control software. But anyone care to explain bit more what happened behind the scene, when pushes to shared folder? My understanding is that shared drive is essentially a shared link/shortcut, so for a shared drive, Mercurial on local machine is only hold the lock for that link, but the fact is that each users machine could had a different instance of Mercurial holding the links' lock, while the server's Mercurial instance will hold its own link on physical drive. I can see it is complicated, but how it is going to fail? I can understand the conclusion, but couldn't by myself link the facts to the conclusion

推荐答案

您不应将Mercurial存储库放置在网络服务器上的共享文件夹中,因为在这种情况下以及在推送到Windows Server 2003的过程中,Mercurial无法可靠地持有锁.中央存储库,锁对于避免损坏存储库至关重要.

You should not place the Mercurial repository on a shared folder on a network server because Mercurial cannot reliably hold locks in all situations in such a setup, and during pushes to that central repository, locks are crucial to avoid corrupting the repository.

实际上,我将删除不鼓励使用",并将其替换为不可能",并且仅 使用hgweb或hg serve为存储库提供服务,前者是建议的设置长期运行的服务器.

In fact, I would remove the "not encouraged" and replace it with "not possible", and only serve the repository either with hgweb or hg serve, the former being the recommended setup for long-running servers.

这篇关于将Mercurial存储库放在共享的网络驱动器中是个好主意吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 01:08