1

I am new to ClearCase (just started Today), I used GIT and SVN before for version control.
In Git, I generally 'clone' the repository to fetch the code to my local and do the 'checkout'

What is the equivalent for it in ClearCase?
I read the document (https://www.ibm.com/docs/en/rational-clearcase/9.0.1?topic=software-cleartool) but there is no clear definition for 'clone' and 'checkout'

Any help on this is appreciated and will be helpful for many!

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Harry
  • 3,072
  • 6
  • 43
  • 100

1 Answers1

1

First, I detailed general equivalences between Git and ClearCase in "What are the basic ClearCase concepts every developer should know?" (2009)

Second, there is no direct equivalent for git clone, since a clone would get (with default settings) the full history of a remote repository, which is never done with ClearCase: you don't get the full copy of a VOB (Versioned Object Base). Said Vob can be as large as many terabyte!

In ClearCase:

  • you create a view (snapshot, dynamic or web view)
  • you configure its config spec in order to select the versions of each file/folder you want to see in this view.
    • automatic configuration through UCM views, which derives their selection rules from the stream foundation baselines of each UCM components, meaning of each VOB root component folder,
    • or manual configuration for non-UCM view, where you specify whatever path and rules you want through config spec.

Note: the term checkout is a loaded one.

  • in Git, it has been judged too confusing, and replaced with:
    • git restore, to restore files at a certain version
    • git switch (to switch branches, which is done in ClearCase by modifying the config spec of an existing view, or by creating another view alltogether)
  • in ClearCase, cleartool checkout is used to mark a file for modification, and lock its state, before releasing the lock with a cleartool checkin.
    There is no need for such a pessimist lock with Git: you modify and commit locally whatever you want, and push later to the remote repository.
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for the quick response, I have already created the view but could you tell us what is the way (using Linux command) to pull the code to my local ? – Harry Jan 05 '22 at 18:09
  • @Harry What view did you create? A snapshot one? A dynamic one, a web one? – VonC Jan 05 '22 at 18:42
  • Created web and dynamic one – Harry Jan 05 '22 at 18:42
  • @Harry Is it an UCM view based on a stream, or just a regular dynamic view, with cleartool mkview? – VonC Jan 05 '22 at 18:45
  • Dynamic view with clear tool mkview – Harry Jan 05 '22 at 18:48
  • @Harry By default, a regular dynamic view shows the latest versions of the main branch of the mounted Vob(s), ... provided that you have Vob mounted: https://www.ibm.com/docs/en/rational-clearcase/8.0.1?topic=vobs-mounting-from-command-line-unix. Thenk check `ls /view/MyView/vobs/MyVob` – VonC Jan 05 '22 at 18:58
  • I accepted your answer, When I filter using the command : ct lsview -properties -full {myviewname}, I am able to find my view BUT I am not able to find my view under the folder /view/ so How to add the my view under the folder /view/ ? – Harry Jan 06 '22 at 11:53
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/240788/discussion-between-vonc-and-harry). – VonC Jan 06 '22 at 13:22