1 / 69

ClearCase Basics

ClearCase Basics. Introduction ClearCase Concepts Simple ClearCase Use Case ClearCase GUI and CLI Version Control of Directories Config Spec Labels, Branches, Merge Comparing Files and Folder versions Version extended pathnames. Contents. Foo.c include head.h ………….

minnie
Télécharger la présentation

ClearCase Basics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ClearCase Basics

  2. Introduction ClearCase Concepts Simple ClearCase Use Case ClearCase GUI and CLI Version Control of Directories Config Spec Labels, Branches, Merge Comparing Files and Folder versions Version extended pathnames Contents

  3. Foo.c include head.h ………….. Foo.c include header2.h ………….. Foo.c include header.h hello………….. Foo.c include header.h when………….. Introduction – The CM Nightmare Foo.old Foo.bak C:\dev\new\Foo.c C:\dev\Foo.c Which of these went into release 2? Which of these has bug 34 corrected? Who made that change on line 54? Where are Joe’s changes?

  4. Version Control VOB Workspace Management View Process Control Trigger Release Management Label, attribute src/ foo.c foo.h bar.c TESTED=”yes” REL1.0 Introduction – ClearCase basic Functions

  5. VOB - Version Object Base View – Workspace Element- file or directory Branch – A way to make parallel development possible. Label – Tag Attribute- Name/value pair ClearCase Conceptssome keywords

  6. Version Object Base A file system where ClearCase stores all version controlled files and directories. Contents of a VOB is accessed using views A VOB is visible on a client if mounted ClearCase Concepts – A VOB is…

  7. A file or a directory that is version controlled in ClearCase. Each element has a version tree. ClearCase Concepts – An Element is…

  8. A way of making parallel development possible Used to organize the different versions of files and directories An object that specifies a linear sequence of versions of an element The entire set of an elements versions and branches are called a versiontree. ClearCase Concepts – A Branch is…

  9. ClearCase Concepts – A Version Tree

  10. A workspace Selects one version of each element in every mounted/selected VOB, presented in a directory structure. Two types of Views Dynamic Snapshot ClearCase Concepts – A View is…

  11. Label – is a ”tag” to mark certain versions of a file, directory or a hole ”product structure”. E.g. to ”freeze” code at a specific release. Attribute – a name/value pair used to describe a ClearCase object. E.g. TESTED=”yes” ClearCase Concepts – Attribute and label is

  12. ClearCase Concepts – Elements in a VOB Public class { Public void… getA() - } Public class { Public void… Int getA() - } mod.java source Public class { Public void… Int getA(int i) Int getB() - }

  13. ClearCase Concepts – VOB & View View Workspace View private storage Visible versions are filtered by config spec rules Config Spec VOB Checked out version

  14. View Configuration Config 1 mod.java source Config 2

  15. Working a view • Checking out a file • Actually creates a copy in the view • Undo Checkout for file, can leave a *.keep file as a view private file.

  16. Simple ClearCase Use Case Access ClearCase: Start View, Mount VOB Check-out file Mark and right click Checkout Foo.c include header.h ………….. Edit file Checkin File Mark and right click Checkin

  17. Foo.c 1 REL1 2 3 REL2 4 Bar.c 1 REL2 2 Simple ClearCase Use Case #1 VOB Jane’s View Joe’s View

  18. Foo.c 1 REL1 2 3 REL2 4 Bar.c 1 REL2 2 Simple ClearCase Use Case #2 VOB Jane’s View Joe’s View Checkout

  19. Foo.c 1 REL1 2 3 REL2 Foo.c include header.h ………….. 4 Bar.c 1 REL2 2 Simple ClearCase Use Case #3 VOB Jane’s View Joe’s View Edit file

  20. Foo.c 1 REL1 2 3 REL2 Foo.c include header.h ………….. 4 Bar.c 1 REL2 2 Simple ClearCase Use Case #4 VOB Jane’s View Joe’s View Foo.o Compile Foo.exe

  21. Foo.c 1 REL1 2 3 REL2 4 Bar.c 1 REL2 2 Simple ClearCase Use Case #5 VOB Jane’s View Joe’s View Foo.o Checkin file Foo.exe

  22. Foo.c 1 REL1 2 3 REL2 4 Bar.c 5 1 REL2 2 Simple ClearCase Use Case #6 VOB Jane’s View Joe’s View Foo.o Checkin file Foo.exe

  23. Foo.c 1 REL1 2 3 REL2 4 Bar.c 5 1 REL2 2 Simple ClearCase Use Case #7 VOB Jane’s View Joe’s View Foo.o Foo.exe

  24. ClearCase Explorer Windows Explorer ClearCase CLI: cleartool Tool integration Working in ClearCase

  25. The Windows Explorer is used to work in ClearCase Access files NO ClearCase move NO ClearCase remove NO ClearCase rename Entire filesystem Windows Explorer

  26. ClearCase Explorer • Use the ClearCase explorer to work in ClearCase: • Access files • ClearCase move • ClearCase rename • ClearCase remove

  27. ClearCase GUI Menues Context menu ToolBox Help

  28. ClearCase GUI View VOB Version Tree Elements

  29. 1 ClearCase CLI interface:cleartool Same Syntax as UNIX ClearCase

  30. Working in a view • Storing files in a view • Does not share these files to everybody working in the VOB. • These files are View-private and only seen by those working in that particular view. • Not seen by others until they are put under source control

  31. Creating and Changing Elements • Version controlled elements are created using ”Add to source control” command • In order to edit an element, it has to be “Checked Out” • Changes are committed using the “Check in” command

  32. Find Checkouts • In order to find checked out elements

  33. ClearCase GUI – Version Tree element * CHECKEDOUT element * \main\LATEST

  34. Version tree – How to look at other version The eye shows which version is selected in view To look at other version mark it and use the Windows ”Send To” menu

  35. Version Control of Directories When is a new directory version created? • Adding a new element • Removing an element • Renaming an element • Moving an element

  36. ConfigSpec 5 5 2 6 Added config.cs 6 3 Version Control of Directories ClearCase automatically checks out/in the directory when using the Windows GUI:s. Example: Moving a file from ClearCase to ConfigSpec Drag and drop ClearCase Removed config.cs

  37. Element type Filename Version Selector element * CHECKEDOUT element * /main/LATEST Element type E.g. Element (= all element types) , element -file , element -directory Filename Pathname to file: \project_vob\src\hello.c Pathname pattern: *or\project_vob\... Version Selector /main/4,/main/LATEST, /main/br1/LATEST, BUILD_45, RELEASE2 The Config Spec

  38. The Config Spec element * CHECKEDOUT element *.doc /main/LATEST element *.vsd /main/LATEST element *.mmap /main/LATEST element *.ppt /main/LATEST element *.mdl /main/LATEST element *.pdf /main/LATEST element *.xls /main/LATEST element *.zip /main/LATEST element *.exe /main/LATEST element .../ReqPro/... /main/LATEST element .../tools/clearcase/... /main/LATEST element ".../NPP Project/..." /main/LATEST element ".../NPP System/1_Business Modeling/..." /main/LATEST element ".../NPP System/2_Requirements/..." /main/LATEST element ".../NPP System/3_Design and Usability/..." /main/LATEST element ".../NPP System/4_Analysis and Design/..." /main/LATEST element ".../NPP System/6_Test/..." /main/LATEST element ".../NPP System/8_Enviroment/..." /main/LATEST element ".../NPP System/9_Config and Change Mgmt/..." main/LATEST element * CLEARCASE_CURRENT -nocheckout element * BUILD_SCRIPTS_CURRENT -nocheckout element * /main/npp_got_rel1/LATEST element * /main/LATEST -mkbranch npp_got_rel1

  39. Setting the Config Spec • To set the Config Spec in ClearCase you can use the command line, the GUI or script. • The command line can be used to read an existing text file or to edit it manually. • The GUI is used to edit it manually.

  40. Setting the Config Spec – the GUI Select the Config Spec tab In ClearCase ExplorerRight-click on the view and select properties of view And press Edit When done editing save your changes by pressing OK

  41. Setting the Config Spec – the cmd For editing an existing Config Spec use cleartool edcs An tmp file is opened where you can edit the Config Spec. When done, close the tmp file and answer “y” in the cmd if you like to set the new Config Spec

  42. cleartool setcsis a good command to use if you for example have a text file with the Config spec to use.You just write cleartool setcs path_to_file_to_use.txt Setting the Config Spec – the cmd

  43. Is a user-defined name that can be attached to a version. Identify specific versions of elements Can be used in config spec rules to identify branching points or to mark all versions that where used in a build. A Label…

  44. Apply Label

  45. Apply Label Select your view Press Next

  46. Apply Label Select where to apply the label Press Add>> Press Next

  47. Apply Label Browse for the label you would like to apply

  48. Apply Label Select which label to apply Or create a new label NOTE:Remember that label names shall be all UPPER CASE Press OK

  49. Apply Label Press Finish

  50. Apply Label – the Version Tree Label on specific file version can be seen in the Version Tree

More Related