保留的结帐和未保留的结帐有什么区别? [英] What is the difference between a reserved checkout and an unreserved checkout?

查看:78
本文介绍了保留的结帐和未保留的结帐有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在ClearCase中检出文件时,它询问我是否要检出文件保留或未保留。这些结帐类型之间的区别是什么?何时使用它们才合适?

When I check out a file in ClearCase it asks me if I want to check out the file "Reserved" or "Unreserved". What are the differences between these types of checkouts and when are the appropriate times to use them?

推荐答案

每个开发人员应了解的基本clearcase概念是什么? ,ClearCase支持两种锁定机制:

As mentioned in "What are the basic clearcase concepts every developer should know?", ClearCase support a locking mechanism which is both:


  • 悲观:保留的结帐实际上并不能阻止其他人进行自己的签出,但是他们将不得不等待签出文件为保留的人进行签入:只有在该人签入后,其他人才能签到进行第一次签入(然后每个其他用户都必须将其版本与最新的签入文件合并)

    注意:保留签出可以释放其锁并被取消保留,由所有者或管理员;

  • "pessimistic": reserved checkout doesn't actually prevent other people to do their own checkout, but they will have to wait for the person who has the file checked out as "reserved" to do the check in: nobody can check-in until that person does the first check-in (then each other user will have to merge his/her version with the latest checked-in file)
    Note: a "reserved" checkout can release its lock and be made unreserved, either by the owner or the administrator;

乐观:取消服务签出,这意味着(如果没有人在同一文件上使用保留的签出):第一个签入的用户无需进行任何其他操作就可以执行此操作,其他签到者则必须将其工作与最新签出的对象合并-

"optimistic": unreserved checkout which means (if nobody use a reserved checkout on the same file): the first one to check-in can do it without any other operation, the other ones will have to merge their work with the latest checked-in file.

在期限内,如果使用策略为:

In term if usage policy:


  • 通常,保留的结帐很好,因为它允许您以高优先级进行更改:必须首先考虑它们。

  • 对于无需立即签入的本地修改,无需预留签出就足够了。

  • 对于根本不需要签入的本地修改,被劫持的文件或被遮盖的文件就足够了(因此,根本无需签出)

注意:

A cleartool checkout / checkin 不同于:


  • svn结帐 / < a href = https://git-scm.com/docs/git-checkout rel = nofollow noreferrer> git checkout ,它们正在更新一个工作版本库,其中包含修订/提交的内容,而不是签出文件的版本:一组文件与一个文件。

  • checkin : svn提交 / git commit 记录了可能是 multi的更改将个文件保存到仓库中(对于SVN来说是远程文件,对于Git是本地文件),而不是为一个文件创建新版本。

  • svn checkout/git checkout, which are updating a working repository with the content of a revision/commit, as opposed to checkout a version of a file: set of files vs. one file.
  • "checkin": svn commit/git commit which registered changes of possibly multiple files to the repo (remote for SVN, local for Git), as opposed to creating a new version for one file.

Git本身不会具有文件锁定(保留的签出)。只有使用Git的系统才能提供该功能,例如 Git LFS

Git itself would not have "file locking" (reserved checkout). Only system using Git might offer that feature, like Git LFS.

这篇关于保留的结帐和未保留的结帐有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆