- # Now, do the imports. We limit the number of commits to prevent memory
- # leaks from taking out the VE. This command is incremental, just adding
- # new commits since the last run.
- if [ ! -d $GITBASE/cvsimports ]; then
- rm -rf $GITBASE/cvsimports
- mkdir $GITBASE/cvsimports
- chgrp repo $GITBASE/cvsimports
- chmod 755 $GITBASE/cvsimports
- chmod g+s $GITBASE/cvsimports
+ # $1 is the local CVS module to check
+ lines=$(find "$CVSROOT/$1" -name "#cvs*" | wc -l)
+ if [ $lines -gt 0 ]; then
+ return 0 # locks are present
+ else
+ return 1 # no locks present