To open a version not currently in your view from a command prompt using a version-extended path

Tip: This procedure assumes that if you work in a snapshot view, the element is loaded in the view.
  1. Start a dynamic view or change to a directory loaded into a snapshot view.
  2. If a cleartool prompt is not already displayed, display one. To see the list of versions for an element, type the following command:
    cleartool lsvtree element-path

    The output of the lsvtree command uses version-extended paths to identify each version.

    For example:
    • On UNIX systems and Linux:
      % cleartool lsvtree prog.cprog.c@@/main 
      prog.c@@/main/0 
      prog.c@@/main/r1_fix
      prog.c@@/main/r1_fix/1 
      prog.c@@/main/r1_fix/2 
      prog.c@@/main/1 
    • On Windows systems:
      > lsvtree prog.cprog.c@@\main 
      prog.c@@\main\0 
      prog.c@@\main\r1_fix 
      prog.c@@\main\r1_fix\1 
      prog.c@@\main\r1_fix\2 
      prog.c@@\main\1
  3. You can use standard differences tools or cleartool diff to compare versions against each other. For example:
    • On UNIX systems and Linux:
      % cleartool diff prog.c@@/main/r1_fix/1 prog.c@@/main/1
    • On Windows systems:
      > diff prog.c@@\main\r1_fix\1 prog.c@@\main\1
  4. To open a version, do one of the following, depending on the type of view you use:
    • In a snapshot view, you must use the cleartool get command to copy a version into your view. If your development application relies on specific file extensions, the -to argument of the get command must use the required extension.
      For example, the following command copies prog.c@@/main/r1_fix/1 (on Windows systems: prog.c@@\main\r1_fix\1) to prog.old.c in the current directory:
      • On UNIX systems and Linux:
        % cleartool get -to prog.old.c prog.c@@/main/r1_fix/1
      • On Windows systems:
        > get -to prog.old.c prog.c@@\main\r1_fix\1
    • In a dynamic view, you can use this version-extended path just as you would use a standard path.

      For example, in a text editor (on a UNIX system or Linux) or in the Open window of Visual Studio (on Windows systems), you can use the file name prog.c@@/main/r1_fix/1 (on a Windows system: prog.c@@\main\r1_fix\1) to open the first version on the r1_fix subbranch.

      Windows tip: You must use backslashes when providing version-extended paths to Windows applications.

If your development application relies on specific file extensions, use a standard copy shell command to copy the version-extended path to a file name with the required extension.

Related concepts
Views
Before accessing files from snapshot views
How your views are populated in base ClearCase
About starting views and activating VOBs
Related tasks
To open a version not currently in your view from the Version Tree Browser or (on Windows systems) the History Browser
To add shortcuts to your Windows Send To folder
To change the versions a view selects (Windows)
To see the history of an element
To see the version tree of an element

Feedback