accurev

Diff all files in an AccuRev transaction with the parent stream version


Given a transaction ID, how would one go about generating a diff between all of the files in the transaction with their corresponding versions in the parent stream using the AccuRev command line tools?


Solution

  • You will need to write a script to accomplish this. Here's a rough algorithm that should work:

    1. Run a hist command on the transaction using the "-fvx" switch. This will verbose output in XML format. You want the list of elements, the version for each element and the name of the stream.
    2. Run a show streams with the -fx switch against the stream in which the transaction resides. The goal here is to get the name of the backing stream.
    3. For each element run a stat command to find the version currently in the backing stream and then run a diff command between the version in the transaction and the version found to be in the backing stream.