[Cvsnt] Adding commiting username in loginfo mail

Richard Farthing keynet at london.com
Wed Jan 23 17:56:24 GMT 2002


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Hi,

I do something very similar, and my command is:

DEFAULT perl -S cvs_loginfo_html_email.pl "%{sVv}" "$USER"

and this works.  But I had to hack the email script with some
code I found on the Net to make it it do the user email address
lookup, because as you say, CVS won't get it from the USERS file
and present it to the script as a parameter.  So you get a mail
with the CVS user as the "from", and his real email address <in
brackets> for any replies.  I integrated it with a script called
"subscribe me" that allows users to self-subscribe and
unsubscribe to notifications. Let me know if you want my
modified files,

regards
Richard


> Hi,
>
> I'm using the following line in CVSROOT\loginfo to send emails with
> the commit info:
>
> ^cvsroot        perl -S cvs_loginfo_email.pl "%{sVv}" CVS jonasb
>
> The Perl script is a modified script from the DevGuy package. The two
> last arguments are special. Second from the end is the username to be
> used in the FROM field in the mail. The last argument is a comma
> separated list of recipents. As you can see I use "CVS" as the sending
> user, but I would like to have the commiting users name instead.
>
> I've tried the following line hoping it would expand the environment
> variable USERNAME (using impersonation with pserver), but it won't do
> the expansion (%USERNAME% in FROM field):
>
> ^cvsroot        perl -S cvs_loginfo_email.pl "%{sVv}" %USERNAME%
> jonasb
>
> How do I put the impersonated users name in the argument list? CVS
> username is not valid here because it might not be a valid email
> account (if no other choice the CVS user name is ok). Is there no
> variable (like %s used in CVSROOT\notify) I can use?
>
> An alternativ could be to insert the user name in the mail body,
> retrieving the username in the Perl script instead. This could be the
> CVS username or the impersonated users user name. The question is then
> how to get the user name in the script.
>
> Thanks in advance!
>
> Jonas
> _______________________________________________
> Cvsnt mailing list
> Cvsnt at cvsnt.org
> http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs



_______________________________________________
Cvsnt mailing list
Cvsnt at cvsnt.org
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook