info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regarding cvscommit file.


From: help
Subject: Re: Regarding cvscommit file.
Date: Wed, 5 Oct 2005 15:04:08 -0400 (EDT)
User-agent: SquirrelMail/1.4.4

>         I'm trying to restrict the check-in of files into CVS based on
> the length of the filename using commitinfo file; but to no success.
> I'm stuck with how to go about calling the script (written in perl) from
> the commitinfo file?
> Any ideas? Thanks for your help in advance.

does commitinfo actually run during checkin of a new file as well??
that i'm not sure of, i know it definetely runs when you issue a commit on
a file that already exists in the repository.
that being said, this is what you can do:

lets assume the perl interpreter is at /usr/bin/perl
and the perl script you want to run is /home/me/perlscript

you could add this line to your commitinfo file:

ALL /usr/bin/perl /home/me/perlscript


thats all. it means that every commit will cause that line to be executed.
CVS will then call the perl interpreter and run perlscript, it will add
two arguments to that call, the first being the path of the file you are
commiting and the second will be the actual name of the file.

the path may be irrelevant to you. this is the path on your client machine
where that file is located.

the actual filename is important to you. do your filename size check on
that second argument.

-Ralph


> Hi,
>         I'm trying to restrict the check-in of files into CVS based on
> the length of the filename using commitinfo file; but to no success.
> I'm stuck with how to go about calling the script (written in perl) from
> the commitinfo file?
> Any ideas? Thanks for your help in advance.
>
> Regards,
>
> Maninder Singh
>
> Member-SDG(SCM)
>
>
> _______________________________________________
> Info-cvs mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/info-cvs
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]