+ All Categories
Home > Documents > 06_scm271_ecc_s04

06_scm271_ecc_s04

Date post: 30-May-2018
Category:
Upload: jagadeesh
View: 215 times
Download: 0 times
Share this document with a friend

of 32

Transcript
  • 8/9/2019 06_scm271_ecc_s04

    1/32

    Copyright IBM Corp. 2003 4 - 1

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Module 4Working with Elements and Views

    1

    IBM Software Group

    Essentials of Rational ClearCase

    Module 4: Working with Elements and Views

    Topics

    Objectives............................................................................................................ 4-2 Adding Files to Source Control.............................................................................. 4-4Comparing File and Directory Versions ............................................................... 4-11Moving an Element ............................................................................................ 4-14Viewing an Element History................................................................................ 4-20The lost+found Directory................................................................................... 4-21Finding Checkouts.............................................................................................. 4-23Canceling a Checkout ........................................................................................ 4-25Using a Version-Extended Name ........................................................................ 4-28Removing a View ............................................................................................... 4-29

  • 8/9/2019 06_scm271_ecc_s04

    2/32

    Essentials of Rational ClearCase

    4 - 2 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Objectives

    2

    Add files to source control

    Compare versions of elements

    Move, rename, and remove elements and versions

    View an element history

    Find checkouts

    Change an element checkout status

    Cancel a checkout

    Select versions other than those in your view

    Remove a view

    Upon completing this module, you should be able to:Objectives

  • 8/9/2019 06_scm271_ecc_s04

    3/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 3

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Module Topics

    3

    Module Topics Working with Elements

    Adding files and directories to source control

    Comparing versions of elements

    Moving, renaming, and removing elements and versions

    Viewing an element history

    The lost+found directory

    Working with Views

    Finding checkouts

    Changing a checkout status

    Canceling a checkout

    Specifying versions using version-extended names

    Removing a view

  • 8/9/2019 06_scm271_ecc_s04

    4/32

    Essentials of Rational ClearCase

    4 - 4 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Adding Files to Source Control

    4

    Adding Files to Source Control

    As you work on a project, you may create view-

    private files that you want to add to source control

    You can add

    Files

    Directories

    Add files to source control

    GUI Add to Source Control

    Command Line mkelem

    Utility clearfsimport

    You can add files to source control using the GUI, the CLI, or the clearfsimport utility.The next few slides discuss the process and procedure for adding files to source control.

    To find your view-private files within a directory, refer to the Kind column in ClearCaseExplorer. To search for view-private files across directories in dynamic views, you canuse the lsprivate command.CLI Procedure

    Usage:

    lsprivate (dynamic views only)

    Example:

    % cleartool lsprivate

    /vobs/Hardware/src/hello

    /vobs/Hardware/src/test.c

    /vobs/gui/motif/util.c [checkedout]

    /vobs/gui/motif/util.o

  • 8/9/2019 06_scm271_ecc_s04

    5/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 5

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Adding Files to Source Control (cont.)

    5

    Adding Files to Source Control (cont.)When you add a file to source control, ClearCase:

    Determines the file type

    Creates an element

    Creates the /main branch and an empty version 0

    By default, leaves the element checked out

    You can create new ClearCase elements by adding files or directories to source control.

    When you add a file or directory to source control, ClearCase determines the file typeand creates a new element. It automatically creates the /main branch and populates

    the version tree with the empty version 0. On UNIX, the default is to leave the newlyadded element checkedout.

  • 8/9/2019 06_scm271_ecc_s04

    6/32

    Essentials of Rational ClearCase

    4 - 6 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Adding a File to Source Control: CLI

    6

    Adding a File to Source Control: CLI

    2

    Checkout the

    current directory.

    3

    Add the file to source control.

    mkelem [-nco | -ci] [ -ptime ] [-c comment | dfile pname | -cq |-cqe | -nc] element-pname ...

    1

    Find the file toadd to sourcecontrol.

    When you add a file to source control, you create a new element using the cleartoolmkelem command.

    Check out the current directory before you execute the mkelem command.

  • 8/9/2019 06_scm271_ecc_s04

    7/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 7

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Adding a File to Source Control: GUI

    7

    Adding a File to Source Control: GUI

    1

    Select the file to add tosource control.

    2

    Click File > VOB object > Create elementfrom file.

    3

    Enter acomment, andthen click OK.

    You can also add files to source control through the File Browser.

    By default, ClearCase keeps the file checked out once it has been added to sourcecontrol. In the Add to Source Control dialog box, clear the Keep checked out box if you

    want ClearCase to check in the file.

  • 8/9/2019 06_scm271_ecc_s04

    8/32

    Essentials of Rational ClearCase

    4 - 8 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Adding a New Directory to Source Control

    8

    Adding a New Directory to Source Control

    1

    Checkout the current directory.

    2

    Make the new versioned directory.

    cleartool mkdir[-nco | -ci] [-c comment| -cfile pname | -cq |-cqe | -nc] dir-pname ...

    When you add a parent directory to source control, ClearCase does not automaticallyadd all child objects to source control. They remain view-private unless you specificallyadd them to source control.

  • 8/9/2019 06_scm271_ecc_s04

    9/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 9

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Adding Many Files or Directories

    9

    Adding Many Files or Directories When you must add a number of files or directories

    to source control use clearfsimport

    clearfsimport is a command-line utility that converts

    file system directories and files to ClearCase

    elements

    clearfsimport creates new elements or adds new

    versions to existing elements

    You must be root (UNIX) or the VOB owner to run clearfsimport unless you invoke itwith the -nsetevent option.

  • 8/9/2019 06_scm271_ecc_s04

    10/32

    Essentials of Rational ClearCase

    4 - 10 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Working with VOB Symbolic Links

    10

    Working with VOB Symbolic Links A VOB symbolic link

    makes a file element ordirectory accessible frommore than one location inthe VOB

    VOBs and directories aresometimes symbolicallylinked for organizational

    purposes

    Links are generally createdby the ClearCaseAdministrator

    Symbolic links make a file element or directory accessible from more than one locationin the VOB.

    VOB symbolic links are usually set up by a ClearCase administrator and are generally

    transparent to uses performing typical checkout/checkin activities.However, if you want to change the contents of a symbolically linked directory, youmust check out the directory from its actual location and not its symbolic location.

  • 8/9/2019 06_scm271_ecc_s04

    11/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 11

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Comparing File and Directory Versions

    11

    Comparing File and Directory Versions

    ClearCase allows you to compare element and directory

    versions

    Can compare a version with predecessor or with any

    other previous version in the tree

    Select the file,and then click

    Versions > Diff.

    You can compare with the previous version or with another version in the tree.

    For example, you might want to compare your checked-out version of an element to itspredecessor to see what changes you have made. Or, you might want to compare yourchecked-out version to a particular historical version or a version being used by one ofyour colleagues.

    If the versions are identical, ClearCase asks you if you want to proceed with thecomparison.

    The diff algorithm uses the appropriate utilities for the comparisons.

    You can also use the ClearCase compare utilities to compare Rational Rose models,Rational XDE models, XML, and HTML files.

  • 8/9/2019 06_scm271_ecc_s04

    12/32

    Essentials of Rational ClearCase

    4 - 12 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Comparing File Versions

    12

    Comparing File VersionsThe Compare tool displays a graphical comparison of

    text files.

    When you compare element versions graphically, the Compare tool displays thecontents of the file in side-by-side windows that scroll in unison. It points outdifferences between the versions.

    The Navigate menu allows you to jump easily from one difference to another.

    This window, as you will see, is also the basis for merging. Many of the options will bethe same when we discuss merging in a later module.

    CLI Procedure

    Usage:

    diff [-serial_format | -diff_format | -columns n] [-optionspass-through-opts][-predecessor]pname ...

    Example:

    /vobs/Hardware/src% cleartool diff hello.c@@/main/1 hello.c

    ********************************

    > file 2: hello.c********************************

    ------------[changed 1-3]--------------|------------[changed to 1-9]-----------

    main() { +| #include "hello.h"+

    printf("Hello, %s!\n", env_user() +

  • 8/9/2019 06_scm271_ecc_s04

    13/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 13

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Comparing Directory Versions

    13

    Comparing Directory VersionsThe Compare tool enables you to view, side-by-side,

    the elements appearing in two versions of a directory.

    test.c and Makefile2were deleted

    util.h and newfile.cwere added

    hello2.c waschanged to hello.c

    CLI Procedure

    Example:

    /vobs/Hardware% cleartool diff -pre src

    ********************************

    > directory 2: src

    ********************************

    --------------|--------[ added ]---------------

    | hello.h 03-Sep-2002 alex

    --------------|--------[ added ]---------------

    | util.c 03-Sep-2002 alex

  • 8/9/2019 06_scm271_ecc_s04

    14/32

    Essentials of Rational ClearCase

    4 - 14 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Moving an Element

    14

    Moving an Element

    move | mv [-c comment| -cfilepname | -cq | -cqe | -nc]pname target-pname

    1

    Check out the to and from directories.

    2

    Move the file fromthe source directoryto ../bin.

    3

    Checkin the source and destinationdirectories to complete the move.

    During a development project, changes to the project may require you to moveelements from one directory to another, or even to another VOB.

    Before you move an element, check out both the source and destination directories.

    Moving elements affects other project members. Check with the project manager or aClearCase administrator before you move elements.

    Use the cleartool mv command to move an element from one VOB directory toanother.

    Use cleartool relocate to move an element between VOBs.

  • 8/9/2019 06_scm271_ecc_s04

    15/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 15

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Removing References to an Element: GUI

    15

    Removing References to an Element: GUI Remove the name of an element or VOB symbolic link

    from a directory list

    The element still exists in the VOB

    Because directories as well as files are under version control, you can remove elementsfrom a specific version of the directory. This will render the element invisible in thedirectory, but does not permanently delete the element from the VOB. Moving orremoving elements creates new versions of the parent directories to record the

    modifications.

    For example, version 4 of /vobs/Hardware/src contains an element named util.c. If youremove util.c from the src directory, ClearCase creates version 5 of vobs/Hardware/src,which does not contain the util.c file element. The element util.c itself remainsunmodified, just not visible in the current (version 5) and future versions of the srcdirectory.

    Removing references to elements affects other project members. Check with the projectmanager or ClearCase administrator before you remove references to elements.

  • 8/9/2019 06_scm271_ecc_s04

    16/32

    Essentials of Rational ClearCase

    4 - 16 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Removing References to an Element: CLI

    16

    Removing References to an Element: CLI

    1

    Check out the directory wherethe element resides.

    2

    Remove the element name.

    3

    Check in the directory.

    rmname [-c comment| -cq | -cqe | -nc][-nco [ -force]]pname ...

  • 8/9/2019 06_scm271_ecc_s04

    17/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 17

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Renaming an Element

    17

    Renaming an Element

    2

    Enter the new file name,and then click Ok

    1

    Select element, and then clickFile > VOB object > Renameelement or link.

    Renaming an element creates a new version of the parent directory to catalog the newelement name. The element uses its new name in subsequent versions of its parentdirectory, but previous versions of the parent directory refer to the element by itsprevious name.

    Renaming elements affects other project members. Check with the project manager orClearCase administrator before you rename elements.

    The cleartool move command can be used to move and rename elements form theCLI.

    CLI Procedure

    Usage:

    move | mv [-c comment | -cfilepname | -cq | -cqe | -nc] pname target-pname

    Example:

    /vobs/Hardware/src% cleartool move util.c newutil.c

    Moved util.c" to newutil.c".

  • 8/9/2019 06_scm271_ecc_s04

    18/32

    Essentials of Rational ClearCase

    4 - 18 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Removing a Version

    18

    Removing a Version Deletes one or more

    versions of an element

    from the VOB

    Removes all metadata

    items that were attached

    to the deleted version(s)

    In the Version Tree Browser,select the version, and then clickVersion > Destroy > Version.

    When you remove a version, other versions before and after the removed version(s)remain accessible.To remove a version, you must be one of the following:

    Version creator

    Element or VOB owner root

    When removing versions, remember: If removing a non-text file element version, the data container is deleted. If removing a text file element version, ClearCase logically removes the version

    from the data container. No disk space is recovered. The version-ID of a deleted version is never reused. You cannot delete a version from which there is currently a checkout. Subsequent references to a removed version produce an error.

    CLI Procedure

    Usage:rmver [-force] [-version version-selector | -vrange low version high-version]

    [-c comment| -cfile comment-file-pname |-cq | -cqe | -nc]pname ...Example:/vobs/Hardware/src% cleartool rmverutil.c@@/main/r2_int/pat_r2/2Removing these versions of "util.c":/main/r2_int/pat_r2/2

    Remove versions? [no] yRemoved versions of "util.c".

  • 8/9/2019 06_scm271_ecc_s04

    19/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 19

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Removing an Element

    19

    Removing an ElementRemoves an element COMPLETELY from the VOB;

    there is NO WAY to restore it

    Removes all references to it in ALL

    directory lists

    You cannot remove elements that

    have checked-out versions

    To remove an element, you must

    be the element owner, VOB owner,

    or have ClearCase administrative privileges

    There may be rare instances when you want to remove an element completely from theVOB.

    CLI Procedure

    Usage:

    rmelem [-force] [-comment comment | -cfile comment-file-pname | -cquery| -cqeach | -ncomment]pname ...

    Example:

    cleartool> rmelem util.c

    CAUTION! This will destroy the element, all its branches andversions, including all data, meta-data and history, and willremove the element from all directory versions that nowcontain it. Once you destroy the element, there will be noway to restore it to its current state.

    If you want to preserve the element, but remove references toit from future directory versions, use the "rmname" command.

    Element util.c" has 1 branches, 2 versions, and is enteredin 1 directory versions.

    Destroy element? [no] y

    Removed element util.c".

  • 8/9/2019 06_scm271_ecc_s04

    20/32

    Essentials of Rational ClearCase

    4 - 20 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Viewing an Element History

    20

    Viewing an Element History

    An element history is recorded in event records in the VOB

    A ClearCase operation, such as checkout, causes an eventrecord to be created

    Event records include: who, what, when, where, andcomments associated with the event

    ClearCase records each operation, for example check in, check out, reserve andunreserve, as an event record.Events that change the content of elements are considered major, while other events

    are considered minor.

    CLI Procedure

    Usage:lshistory [-long | -short | -fmt format] [-eventid] [-minor] [-nco] [-since date-time][-pname]pname ... | object-selector ...]Example:/vobs/Hardware/src% cleartool lshistory hello.c25-Oct.09:43 pat create version"hello.c@@/main/r2_int/pat_r2/2""Working on changing the text of the STDOUT"

    20-May-1993 rick create version "hello.c@@/main/3"(R1)

    "include name, home dir, and time in message"hello.c@@/main/1""first implementation"

    04-May-1993 akp create branch "hello.c@@/main"04-May-1993 akp create file element "hello.c@@""first implementation"

  • 8/9/2019 06_scm271_ecc_s04

    21/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 21

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    The lost+found Directory

    21

    The lost+found Directory

    Found in every VOB at the highest directory level

    Contains orphaned elements, which are elements

    that are no longer cataloged in any version of any

    directory

    Orphaned elements can result when

    User adds file or files to a directory, but then cancels

    the directory checkout

    User deletes a directory, but not its elements

    Elements can become orphaned if a user:

    Cancels a checkout of a directory after adding a new elementit removes thedirectory element, but not the file elements created in it.

    Removes a directory element without removing the file elements within thedirectory.

    Example:

    /vobs/Hardware/src% cleartool co -nc src

    /vobs/Hardware/src% cleartool mkelem -nc src/test.c

    /vobs/Hardware/src% cleartool unco src

    cleartool: Warning: Object test.c" no longer referenced.

    cleartool: Warning: Moving object to vob lost+found directory

    as test.c.96c93d305a5111ceb0200080c880e47f".

    Checkout cancelled for "src".

  • 8/9/2019 06_scm271_ecc_s04

    22/32

    Essentials of Rational ClearCase

    4 - 22 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Module Topics

    22

    Working with Elements Adding files and directories to source control

    Comparing versions of elements

    Moving, renaming, and removing elements and versions

    Viewing an element history

    The lost+found directory

    Working with Views

    Finding checkouts

    Changing a checkout status

    Canceling a checkout

    Specifying versions using version-extended names

    Removing a view

    Module Topics

  • 8/9/2019 06_scm271_ecc_s04

    23/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 23

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Finding Checkouts

    23

    Finding Checkouts

    The checkout reporting tool enables you to search forcheckouts based on user-defined criteria.

    You can query ClearCase to find existing checkouts based on the criteria you designate.

    CLI Procedure

    The cleartool lsco command displays all checkouts of elements in the current directoryby any view.Usage:lscheckout | lsco [-long | -short | -fmt format] [-cview] [-me | -user login-name][-recurse | -directory | -all | -avobs ] [pname ...]Example:/vobs/Hardware/src% cleartool lsco -all29-Oct.15:17 alex checkout directory version"/vobs/Hardware/src" from /main/2 (reserved)29-Oct.15:14 pat checkout version"/vobs/Hardware/src/Makefile" from /main/r2_int/pat_r2/1(reserved)"updating file to reflect file renaming"

    29-Oct.15:14 pat checkout version"/vobs/Hardware/src/hello.c" from /main/r2_int/pat_r2/2(reserved)"Working on fixing typo in source"

    29-Oct.15:17 alex checkout version"/vobs/Hardware/src/hello.h" from /main/1 (reserved)"updating header"

  • 8/9/2019 06_scm271_ecc_s04

    24/32

    Essentials of Rational ClearCase

    4 - 24 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Finding Checkouts

    24

    Finding CheckoutsBased on selection criteria, ClearCase displays a listof the checked-out files in the checkouts window.

  • 8/9/2019 06_scm271_ecc_s04

    25/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 25

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Canceling a Checkout

    25

    Canceling a Checkout

    Cancel a checkout when you do not want to savechanges or want a fresh copy

    You can rename and save a view-private version of thefile: filename.keep. If you do not save the file, allchanges are lost

    When you cancel a checkout, ClearCase asks if you want to save a view-private versionof the file. If you choose not to save a view-private version, any changes you made tothe checked out version are lost and cannot be restored. Be certain you do not need

    the data before you decide not to keep a view-private version.

  • 8/9/2019 06_scm271_ecc_s04

    26/32

    Essentials of Rational ClearCase

    4 - 26 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Canceling a Checkout from the File Browser

    26

    Canceling a Checkout from the File BrowserOnce you cancel a checkout, your view selects the

    predecessor version.

    1

    Select the checked-

    out element.

    2

    Click Versions > Uncheckout,and then choose the type ofuncheckout to perform.

    You can cancel a checkout at any time. When you do, your view selects thepredecessor version of the element. Once you undo a checkout, any changes youmade to the file are lost.

    When you cancel a checkout, you can save a copy of the file with a .keep extension.CLI Procedure

    Usage:

    uncheckout | unco [-keep | -rm] [-cact | -cwork ]pname ...

    Example:

    /vobs/Hardware/src% cleartool unco util.c

    Save private copy of util.c"? [yes] yes

    Private version of util.c" saved in util.c.keep".

    Checkout cancelled for util.c".

  • 8/9/2019 06_scm271_ecc_s04

    27/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 27

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Selecting a Version Other Than Those in Your View

    27

    Selecting a Version Other Than Those in Your View Enable you to specify a version that may not be

    visible in your dynamic view

    @@ (extended-naming symbol) denotes a path into

    the version tree of an element

    Specific integer versions

    hello.h@@/main/r2_int/1

    User-defined version labels

    util.c@@/R1

    Each version of an element has a unique identifier. From the command line interface,you can use version-extended pathnames to access versions other than the onescurrently selected by your view.

    Version-extended pathnames are useful when: Comparing Rebuilding objects Merging

    CLI Procedure

    To construct a version-extended pathname:

    1. Enter the element name followed by the extended-naming symbol.2. Add the branch pathname.3. Add the version selector:

    Full version-extended pathname example:

    /vobs/Hardware/src/hello.h@@/main/r2_int/1

    Where:

    hello.h@@ is the element name followed by the extended-naming symbol. /main/r2_int is the branch pathname. 1 is the version selector.

  • 8/9/2019 06_scm271_ecc_s04

    28/32

    Essentials of Rational ClearCase

    4 - 28 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Using a Version-Extended Name

    28

    Using a Version-Extended Name

    Using a standard name, you access the version of the filethat your dynamic view selects:

    /vobs/Hardware/src% cat hello.c#include "hello.h"printf("Hello, %s!\n", env_user() ); int main() {

    printf("Your home directory is %s.\n", env_home());

    printf("It is now %s.\n", env_time() );return 0;

    }

    To see a version other than the one selected by yourdynamic view, use a version-extended pathname:

    /vobs/Hardware/src% cat hello.c@@/main/r2_int/11main() {

    printf(Hello there, world!\n);}

    Any time a version-extended name is NOT used in place of the file pathname itself,ClearCase uses the version currently selected by the config spec of the view.

  • 8/9/2019 06_scm271_ecc_s04

    29/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 29

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Removing a View

    29

    Removing a View

    Views are temporary, task-related objects; once aspecific development task or project is complete, removethe view

    Before removing a view, add all important view-privatefiles to source control or copy them to another location

    Removing the view will:

    Clean up VOB references to the view

    Remove the view storage directory

    Remove the view tag and unregister the view

    Stop view server processes

    Do NOT use UNIX Utilities to remove a views storagedirectory

    We recommend that views be considered task-related objects. When the task iscomplete, remove the task-related view.

    Before you remove a view, be sure to add all view-private files to source control ormove them to another location.

    The Remove View tool:

    Purges view related records from all accessible VOBs. Removes view storage directory. Shuts down the view_server process. Removes entries from the ClearCase view registry.

    NOTE: Objects created using ClearCase commands should only be removed withClearCase commands.Do not remove a view using UNIX utilities. Views are more thanjust a directory; there is a server process and registry entries to remove.

    CLI Procedure

    Usage:

    cleartool rmview [-force] {-tag dynamic-view-tag | dynamic-view-storage-pname}

    Example:

    /vobs/Hardware/src% cleartool rmview -tag pat_r2_view

  • 8/9/2019 06_scm271_ecc_s04

    30/32

    Essentials of Rational ClearCase

    4 - 30 Copyright IBM Corp. 2003

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Module Review

    30

    What does ClearCase do when you add a file to source

    control?

    What is the easiest way to add many files and directories to

    source control in ClearCase?

    What is the lost+found directory? Why is it significant?

    How can you find out which VOB elements are checked out?

    How do you access versions of elements other than those

    selected by your view config spec?

    Why would you want to remove a view?

    Why should you not use operating system utilities to remove

    a view?

    Module Review

  • 8/9/2019 06_scm271_ecc_s04

    31/32

    Module 4 - Working with Elements and Views

    Copyright IBM Corp. 2003 4 - 31

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

    Module Lab

    31

    In this lab, you perform the following tasks:

    Add files to source control

    Move and rename an element

    View an element history

    Find checkouts

    Access versions not selected by your view

    Remove a view

    Module Lab

  • 8/9/2019 06_scm271_ecc_s04

    32/32

    Essentials of Rational ClearCase