哪种版本控制系统最适合“防止”并发编辑?

发布于 2024-08-03 01:54:18 字数 518 浏览 4 评论 0原文

多年来,我们一直使用 CVS(带有 TortoiseCVS 接口)进行源代码控制和广泛的文档控制(包括 Word、Excel、Framemaker 等二进制文件、测试数据、模拟结果等)。与典型的版本控制系统不同,99% 的情况下我们都希望防止并发编辑 - 当用户开始编辑文件时,该文件的预编辑版本对其他人来说是只读的。

许多将使用此功能的人都不是程序员,甚至不是精通计算机的人,因此我们也在寻找一种系统,让人们只需将文档添加到存储库,签出并编辑文档(除非其他人当前正在编辑)它),然后以最少的麻烦重新检查它。

我们已经让它与 CVS + TortoiseCVS 配合得相当好,但我们现在正在考虑 Subversion 和 Mercurial(如果它们更适合的话向其他人开放)以获得更好的版本跟踪,所以我想知道哪一个支持锁定文件最透明。例如,我们希望默认启用独占锁定,并且我们希望尽可能防止某人意外开始编辑其他人已签出的文件。例如,当有人检出文件进行编辑时,它会首先检查主数据库,即使他们最近没有更新沙箱。如果文档脱离网络并且无法在母舰上签入,它甚至可能不允许用户签出文档。

We've been using CVS (with TortoiseCVS interface) for years for both source control and wide-ranging document control (including binaries such as Word, Excel, Framemaker, test data, simulation results, etc.). Unlike typical version control systems, 99% of the time we want to prevent concurrent editing - when a user starts editing a file, the pre-edit version of the file becomes read only to everyone else.

Many of the people who will be using this are not programmers or even that computer savvy, so we're also looking for a system that let's people simply add documents to the repository, check out and edit a document (unless someone else is currently editing it), and check it back in with a minimum of fuss.

We've gotten this to work reasonably well with CVS + TortoiseCVS, but we're now considering Subversion and Mercurial (and open to others if they're a better fit) for their better version tracking, so I was wondering which one supported locking files most transparently. For example, we'd like exclusive locking enabled as the default, and we want to make it as difficult as possible for someone to accidentally start editing a file that someone else has checked out. For example when someone checks out a file for editing, it checks with the master database first even if they have not recently updated their sandbox. Maybe it even won't let a user check out a document if it's off the network and can't check in with the mothership.

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

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

发布评论

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

评论(8

无法回应 2024-08-10 01:54:18

Subversion 提供强制锁定。当 Propoerty svn:needs-lock 设置时,文件将以只读方式检出,用户需要锁定它才能获得可写的工作副本。其他用户无法从那里锁定同一文件。

Subversion offers enforced locking. When the Propoerty svn:needs-lock is set, the file is checked out read-only and the user needs to lock it to get an writable working copy. No other user can get the same file locked from there.

屋檐 2024-08-10 01:54:18

我知道它不在您的清单上,但我们对 Perforce 很满意。
您可以通过以下方式防止多次结账

您的 Perforce 管理员可以使用
p4 typemap 命令以确保
指定类型的所有文件(例如
例如, //depot/.../*.gif 对于所有
.gif 文件)只能由一个人打开
一次用户。参见 Perforce
详细命令参考。

I know it's not on your list, but we have been happy with Perforce.
You can prevent multiple checkouts with

Your Perforce administrator can use
the p4 typemap command to ensure that
all files of a specified type (for
instance, //depot/.../*.gif for all
.gif files) can only be opened by one
user at a time. See the Perforce
Command Reference for details.

残花月 2024-08-10 01:54:18

听起来像 SubversionTortoiseSVN 就符合要求。正如 Arne Burmeister 提到的,您可以将其默认为需要锁定模式,其中签出的每个文件都将是只读的,直到您获得锁定为止。通过使用挂钩,您可以让它在文件锁定或解锁时通知其他用户。

TortoiseSVN 与 Windows 资源管理器集成,因此需要很少的计算机知识。

请注意,Subversion 具有“窃取锁定”功能,但如果您愿意,可以通过使用 PreLock 挂钩来禁用此功能。

Sounds like Subversion with TortoiseSVN would fit the bill. As Arne Burmeister mentioned, you can default it to needs-lock mode, where every file checked-out will be read-only until you get a lock on it. Through the use of hooks you can have it notify other users when a file is locked or unlocked.

TortoiseSVN integrates with Windows explorer so requires little computer savvy.

Note that Subversion has a "steal lock" feature, but you can disable this if you wish through the use of the PreLock hook.

晨敛清荷 2024-08-10 01:54:18

您提到了 Mercurial,尽管我是 Mercurial 开发人员,但我必须同意使用 Subversion 的建议。 Mercurial 致力于让人们以分布式方式进行开发。这包括进行私有提交,仅在以后与其他人共享。换句话说,Mercurial 不会尝试锁定中央服务器上的文件(甚至没有中央服务器的概念)。

使用 Subversion,你会发现它是一个很好的集中式版本控制系统(我只尝试过开源系统,我对闭源系统一无所知)。如果您愿意,您仍然可以“在侧面”尝试 hgsubversion

You mention Mercurial, and despite being a Mercurial developer, I must agree with the suggestions to use Subversion. Mercurial is all about letting people develop in a distributed fashion. This includes making private commits which are only shared with others at a later time. In other words -- Mercurial makes no attempt to lock files on a central server (there is not even a concept of a central server).

Go with Subversion, it is as fine a centralized revision control system that you'll find (I have only tried the open source systems, I don't know anything of closed source systems). If you want, you can still experiment with hgsubversion "on the side".

关于从前 2024-08-10 01:54:18

我知道 IBM ClearCase 可以防止这种情况发生。我们出于这个原因在我们公司使用它。

I know IBM ClearCase prevents that. We use it for that reason in our company.

走过海棠暮 2024-08-10 01:54:18

如果只是文档(比如word、excel等),你可以看看Alfresco的文档管理器,它使用起来非常简单。

http://www.alfresco.com/products/dm/features/

If it's only documents (like word, excel, etc.) you could have a look at Alfresco's Document Manager, it's pretty simple to use.

http://www.alfresco.com/products/dm/features/

无名指的心愿 2024-08-10 01:54:18

原来的RCS。签出文件时,您可以锁定它:“co -l 文件名”。此后,直到您将其重新签入(“ci filename”)为止,任何人都无法更改该文件。

The original RCS. When checking out a file, you lock it: "co -l filename". Thereafter, until you check it back in ("ci filename"), no one can alter the file.

零時差 2024-08-10 01:54:18

我不认为任何分布式版本控制(例如 Mercury 或 git)都适合您。 SVN只有最基本的锁定功能 - 并且文件被设置为只读,这就像某些办公工具一样,意味着您可以编辑它,然后发现无法保存它,直到您签出它,然后您签出它结果发现服务器版本不同,您要么丢失了服务器版本,要么丢失了本地版本。

我不敢相信我这么说,但如果你想那样工作,那么视觉源安全是我所知道的唯一这样设计的系统。如果你想要一个更现代/更可靠的版本,看看 sourcegear 的 Vault - 尽管他们付出了巨大的努力来制作看起来像 vss 但在类似 svn 的环境中运行良好的东西。

但也许专用的文档管理解决方案会更好,甚至可能是门户服务器之类的解决方案。

I don't think any distributed version control, like mercury or git, is going to work for you here. SVN has only the most basic features for locking - and the file is set readonly, which in the likes of some office tools, means you can edit it, then find you can't save it until you check it out, then you check it out only to find that the server version was different, and you either loose the server version or your local version.

I can't believe I'm saying it, but if you want to work that way, then visual source safe is the only system I know of designed like that. If you want a more modern/reliable version, look at sourcegear's Vault - although they went to great efforts to make something that looked like vss but worked well in an svn like environment.

But perhaps a dedicated document management solution would be better - or perhaps even something like portal server.

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