0

I need to get the version (entire version like main/branch1/branch2/1) of a particular file using ClearCase tool or java code.

Can some one please help me on this ?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
IamMySelf
  • 9
  • 1
  • Describing the actual problem's context might help a lot... – planetmaker Nov 05 '15 at 12:38
  • I have a file abc.java ... it is might be in multiple branches say abc, xyz, mno... now i want to give input as abc.java (with full path) and want to check if that file has a different version in all the branches or the same version ... – IamMySelf Nov 05 '15 at 17:04

1 Answers1

1

The command to use is cleartool get:

On a UNIX or Linux system, copy /dev/hello_world/foo.c@@/main/2 into the current directory.

 cleartool get -to foo.c.temp /dev/hello_world/foo.c@@/main/2

On a Windows system, copy \dev\hello_world\foo.c@@\main\2 into the C:\build directory.

 cleartool get -to C:\build\foo.c.temp \dev\hello_world\foo.c@@\main\2

You can see more at "In ClearCase, how can I view old version of a file in a static view, from the command line?":

  • cleartool get don't do stdout (it only copies to a file)
  • in a dynamic view, you can directly access any version you want

    cd /view/MyView/vobs/myVobs/myPath/myFile@@/main/[...]/maBranch
    cat 1
    
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250