Clearcase View and Branch explained

落爺英雄遲暮 提交于 2020-01-14 03:07:19

问题


I've recently started working on a new project for which the development team is using ClearCase for version control (the project is coded mostly in java and ExtJs).

I'm hearing the terms 'View' and 'Branch' being thrown around a lot - are these terms interchangeable?
If not, could you please provide a layman's explanation of a View and a Branch and how they relate to each other.

Are Views and Branches particular to ClearCase or are these terms used in other version control systems as well?


回答1:


I'm hearing the terms 'View' and 'Branch' being thrown around a lot - are these terms interchangeable?

No:

  • A view is a way to select versions of elements (files or directories)
    As such, you can select versions from different branches.
  • A branch is a collection of versions, with branching points.
    Each branch starts with a placeholder version (the version 0: /main/0 marks the creation of the element, while /main/aBranch/0 marks the creation of a new branch, a forking point, where the version remains identical to the previous one)

See more at "About branches, versions, and labels":

When you add a resource to ClearCase source control, an element representing that resource is created in the VOB.
The element has a single branch named main and a single version (version 0) on that branch. Successive versions of the element can be created on the main branch, and additional branches can be created if necessary

Every branch in a version tree includes one or more versions of the element. Each version represents a revision of the element.
Versions are identified using a version-extended path name, which includes the path name of the element within its VOB and also specifies its branch name and its version number on that branch. For example, the fourth revision of the file module.java, located on the main branch in the VOB directory \product\src\ has the version-extended path name \product\src\module.java@@\main\4.

See more also at "View that uses attributes to select versions" for an advanced config spec example.


Are Views and Branches particular to ClearCase or are these terms used in other version control systems as well?

Views, especially dynamic views, are specific to ClearCase.
But what they represent is not: it is the combination of a working directory and a version selection mechanism. You find that in most version control system.

Branches are part of all VCS, and enables a merge workflow.
See "How to use git metadata strategies compared to ClearCase ones?" to see that compared with git, for instance.



来源:https://stackoverflow.com/questions/36633724/clearcase-view-and-branch-explained

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!