Is there way in svn diff or any other tool(linux based) to show only whitespace/tabs changes ?.
Purpose, I dont want those diffs to be checked in. I can put back those lines to same state before check in if a tool could catch those diffs.
Thanks,
Is there way in svn diff or any other tool(linux based) to show only whitespace/tabs changes ?.
Purpose, I dont want those diffs to be checked in. I can put back those lines to same state before check in if a tool could catch those diffs.
Thanks,
Beyond Compare will show those highlighted in a different color depending on the type of file. they do have a Linux version, but I have not used it. It is a great diff tool though.
This should work for you.
#!/bin/bash
FILES=`svn status | awk '{ print $2}'`
for file in $FILES
do
COUNT=`svn diff $file --diff-cmd 'diff' -x '-w' | wc -l`
if [ $COUNT -le 2 ]
then
echo "$file has only whitespace changes"
fi
done
Also, instead of putting lines back to the same state, why not just revert those files?