IBM Support

Viewing the previous version of a file element without modifying the view's config spec

Question & Answer


Question

How can the contents of a previous element version be accessed without modifying the configuration specification when working in an IBM® Rational® ClearCase® view?

Answer

Only a single version of an element can be visible in a view at a given time, however, an alternative for viewing the content of a previous version without changing the view's config spec is to save it on the local file system.

ClearCase does not have a built-in function to do this. Your view can only open versions that are selected by the rules in the config spec. To view a previous version of a file element, you can use the Send To option from the Version Tree context menu as described below.

Note: The following steps work with base ClearCase as well as with UCM.

In the example below element version number 3 (the latest version on the branch) is selected by the current view, however, we want to view version 1.

  1. From your view, right-click the element and select ClearCase>Version Tree (from Windows Explorer or Version Tree (from ClearCase Explorer)



    Note: If you are not seeing all versions in the display, you can select the "All Versions" option in the "Tools" menu.

  2. Right-click the version to be opened for read-only > Select Send To > choose the location, such as My Documents:

    Note: Refer to the related URL below for information about a known defect related to selecting the non-latest version and using the "Send to" option.






  3. From there you can open the file using the program it is associated with.

    Note: The file will be renamed to a digit (the version number), but the contents of the file will not be changed. Also, it should still be associated with the correct program; if not, right-click the file, select Open With... and choose the correct program.


Command line example:
    M:\v10\test10-III\den>ct ls -l

    version          file12a.txt@@\main\3         Rule: element * \main\LATEST

    version          file12c.txt@@\main\1         Rule: element * \main\LATEST

    version          myfile.txt@@\main\3          Rule: element * \main\LATEST

    M:\v10\test10-III\den>ct lsvtree -all myfile.txt

    myfile.txt@@\main

    myfile.txt@@\main\0

    myfile.txt@@\main\1

    myfile.txt@@\main\2

    myfile.txt@@\main\3

    M:\v10\test10-III\den>notepad myfile.txt@@\main\1



    M:\v10\test10-III\den>type myfile.txt@@\main\1
    New file element created

    M:\v10\test10-III\den>

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"GUI: Version Tree","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2003.06.00;7.0;7.0.1;7.1;7.1.1;7.1.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"GUI: Version Tree","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21147012