1

I can compare two files in Winmerge by triggering a comparison on the command line with a command similar to:

WinMergeU C:\file1.txt C:\file2.txt

I can query a list of files with particular properties in clearcase with a clearcase query similar to:

Y:\VOB_A>cleartool find . -type l -exec "cleartool describe -fmt "%n %[slink_text]Tp\n\n\" \"%CLEARCASE_PN%\""

.\Directory\createsymlink.txt -->..\..\VOB_B\SymlinkFolder\createsymlink.txt

What I want is to generate a set of clearcase query results that can then be used as input to winmerge (ie generate a bunch of diff commands on checkins fulfilling a certain criteria like user or day).

How can I write a clearcase query to get a list of file elements (referable in clearcase ie winmerge could open the path to the version on a dynamic view), and get their corresponding previous version of the file?

The bit to format this to winmerge I imagine would look somewhat like this:

... describe -fmt "WinMergeU ...
Machavity
  • 30,841
  • 27
  • 92
  • 100
hawkeye
  • 34,745
  • 30
  • 150
  • 304

1 Answers1

0

One, you would need to generate the right full extended pathname for each file (one being the result of your query, one being the previous version of the one found by said query)

Two, you need to do so in a dynamic view (in order to access to any version though the extended path name of the file.

Once your query gives you a version, you can ask, with a cleartool descr -fmt "%PSn" (see fmt_ccase man page), for the previous version and add that to your result file.

Trying to do it all in one pass (find + predecessor version + WinMerge call) seems too complicated.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks VonC - you're a wealth of Clearcase information. I also really enjoyed your preso on Git in the enterprise. Can you elaborate on what you mean by "seems too complicated?" – hawkeye Jan 15 '13 at 21:47
  • @hawkeye trying to -exec or pipe one output to the other is error prone. I prefer dumping the result of one command in a text file, making sure its content is correct, then process that content to the next command. – VonC Jan 16 '13 at 06:53