How to view difference between local hijacked file and the server copy of the file in clearcase

1k views Asked by At

Presently I follow this process:

  1. Right click the root of the project and click on Find Modified Files.
  2. Then in the ClearCase Snapshot View Update window, the modified (hijacked) files are shown.
  3. By right click on the file name and click on Compare with Old Version, difference between local hijacked file and the server copy are displayed.

However, the above approach takes very long time (as step 1 itself takes 10 minutes). If I already know the hijacked file path, then is there a faster way to do the same?

1

There are 1 answers

10
VonC On BEST ANSWER

This 2007 thread summarizes the options you have; the command line with cleartool 9.0.1.3 also offers a diff, even though the thread claims that it doesn't. See bottom of the post.

  • convert the hijack to checked out (then you can diff)

OR

  • rename the hijacked file to something else (like filename.hijacked), reload filename (cleartool update filname) update the file, then run cleartool diff filename filename.hijacked.

OR

  • run the diff against the dynamic view version (from command-prompt, cd to the hijacked file location, then do the cleartool diff filename M:\view\VOB\path\to\file)

I used to do the third option, as it does not require to touch the hijacked file.

With cleartool, compare an extended path name specifying a version, e.g. /main/LATEST, to an simple path. (A command line can be opened conveniently from the context menu of a folder in ClearCase Explorer.)

cleartool diff file.c@@/main/LATEST file.c