Script for comparing working copies

svn diff compares repository URLs only. So, if you reintegrated a branch to the working copy of your trunk or synchronized the trunk to the working copy of your branch, you will have a problem. This little script helps you to compare two working copies.

So checkout the branch and the trunk, submit your svn merge command and compare both with this script. Use fully qualified paths.

#!/bin/bash
trunk="$1"
branch="$2"
cd $trunk
find . -name "*" -type f | grep -v "/.svn" | grep -v "/target/" | while read file; do
  mydiff=`diff $file $branch/$file`
  if [ ! "x""${mydiff}" = "x" ]; then
    echo $file
    echo $mydiff
  fi
done

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha * Time limit is exhausted. Please reload CAPTCHA.