Hey people.
In the interest of not wasting <too> much of your time, I've provided a
summary and detailed view of my problem, select that which is most
appropriate for you. Thanks!
summary--> Im trying to use the loginfo and/or commitinfo files to
automatically export a copy of every file commited to a shared directory,
but the export command can't fire because I get a "[12,34,56] Waiting for
cvs's lock in /myrepository"
detailed--> among other things, I run a CVS server for a moderately sized
website at my company, I have now run into a problem that involving working
with other departments which use inferior tracking methods for source.
Exporting a copy of every file that is committed at commit time will solve
my problem.
I first tried to parse the output of the loginfo file to a perl script I
wrote, specifically, the loginfo entry looks like this:
ALL /thedir/thathas/thescript %s $USER
so the perl script gets the pathname/filename and the Username. the script
then uses a substitution modifier to take out the space, insert a '/' and
provide the input for an export command:
$path=@ARGV[0];
$path=~s/\s/\//;
`cvs export -D "now" -d /the/export/dir $path`;
then it mails the user, but that's irrelevant. The point is that when user
commits, the script attempts the export with the correct path, but fails
with "cvs export: [10:11:12] waiting for cvs's lock in /the/repository/path"
I have tried to do the same thing with the commitinfo file as well hoping
that since commitinfo happens before the commit that perhaps cvs wouldn't
have locked the repository yet, but the same exact thing happens.
I dont think it's necessarily kosher to have the script manually removing
the lock files, and before I attempt cludgeing something like moving the
lock file and then moving it back, I thought I would run this by you wizards
on the cvs list.
I KNOW someone has tried, or is doing something similar to this. Am I
completely heading down the wrong path? Is there a better/faster/less
cludgey way of making this happen?
thanks in advance.
--Dave.