#!/bin/sh
#
# Report the names of files that contain CVS conflicts. Can be invoked as
#    find_conflicts <dir>
# or just
#    find_conflicts
# in which case <dir> defaults to .
#
top=.
if test -n "$1"
then
  top=$1
fi
find $top -name Entries -print | (
    while read f
    do
	d=`echo $f | sed 's#/CVS/Entries$##'`
	awk -F/ '{print $2}' $f | (
	    while read ff
	    do
		ff="$d/$ff"
		grep -l '^<<<<<' $ff
	    done
	)
    done
)
