title: clearcase create diff between parent and child branches
body: <p>So the typical way I would create a diff log/patch between two branches in clearcase would to simply create two views and do a typical unix diff. But I have to assume that there is a more clearcase way (and also a '1-liner').</p>
  
  <p>so knowing how to get a list of all files that have been modified on a branch:</p>
  
  <pre><code>cleartool find . -type f -branch "brtype(&lt;BRANCH_NAME&gt;)" -print
  </code></pre>
  
  <p>and knowing how to get the diff formatted output for two separate files:</p>
  
  <pre><code>cleartool diff FILE FILE@@/main/PARENT_BRANCH_PATH/LATEST
  </code></pre>
  
  <p>so does anyone see any issues with the following to get a diff for all files that have been changed in a branch?</p>
  
  <pre><code>cleartool find . -type f -branch "brtype(CHILD_BRANCH)" -exec 'cleartool diff -ser $CLEARCASE_PN `echo $CLEARCASE_XPN | sed "s/CHILD_BRANCH/LATEST/"` ' &gt; diff.log
  </code></pre>
  
  <p>Any modifications and comments are greatly welcomed</p>
  
  <p>thanks in advance!</p>
  
  <p>update: any ideas on how to get this too be a unix unified diff would also be greatly appreciated.</p>
  
  <p>update2: So I think I have my solution, thanks go to VonC for sending me in the right directions:</p>
  
  <pre><code>cleartool find . -type f -branch "brtype(CHILD_BRANCH)" -exec 'cleartool get -to $CLEARCASE_PN.prev `echo $CLEARCASE_XPN | sed "s/CHILD_BRANCH/LATEST/"`; diff -u $CLEARCASE_PN.prev $CLEARCASE_PN; rm -f $CLEARCASE_PN.prev' &gt; CHILD_BRANCH.diff
  </code></pre>
  
  <p>the output seems to work, I can read the file in via kompare without complaints.</p>