[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Post Commit

From: S I <xiamak_at_hotmail.com>
Date: 2005-08-29 21:39:23 CEST

I need help with setting up the post commit email notifications. I am
reading this response from Mr. Weintraub and it specifies that the shebang
has to be followed by the path of perl.

I just used my scripts out of the box and did not tweak them. Do I need to?
  I set up my post-commit starts with #!/bin/sh, and commit-email.pl starts
with #!/usr/bin/env perl. Running it at the linux prompt and providing it
the repository path, a revision number, subject line and my email addr, it
works manually. Post-commit can run via sh and it doesn't have to point to
perl, does it?

Of course, no one has committed anything yet today, so I'm speaking
prematurely. I'm anxious to see if they work. I'm also curious what
#!/usr/bin/env perl does? Does it clear the environment and call perl?

Also, we're migrating 3 other projects under SVN this week, do I have to
tweak the .pl files per module or are they global?

Thanks

Steve

----Original Message Follows----
From: David Weintraub <qazwart@gmail.com>
To: "Burgan, DeborahX" <deborahx.burgan@intel.com>
CC: Marc Haisenko <haisenko@webport.de>, users@subversion.tigris.org
Subject: Re: Post Commit
Date: Tue, 23 Aug 2005 15:00:35 -0400
MIME-Version: 1.0
Received: from tigris.org ([64.125.133.100]) by mc9-f37.hotmail.com with
Microsoft SMTPSVC(6.0.3790.211); Tue, 23 Aug 2005 12:05:35 -0700
Received: (qmail 32762 invoked by uid 5000); 23 Aug 2005 19:00:41 -0000
Received: (qmail 32698 invoked from network); 23 Aug 2005 19:00:40 -0000
X-Message-Info: JGTYoYF78jFD1UWLBL++sWsBPNhXVoCBmzhCZDtN6Rs=
Mailing-List: contact users-help@subversion.tigris.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
list-help: <mailto:users-help@subversion.tigris.org>
list-unsubscribe: <mailto:users-unsubscribe@subversion.tigris.org>
list-post: <mailto:users@subversion.tigris.org>
Delivered-To: mailing list users@subversion.tigris.org
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
        
h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        
b=Dda7zBvCzH7+ey3zA8Dc94/SQBEx3vVYt/XxNlTzcf0RPZedXFIQGF9MiVG5HpfxAE24DYZ/3g8OHeC2yRnF/FNY03U+JOcikmfMgHulsRlls98C66OkuQ+lFsZAbtI3CSSc54OS7rt6/yXJ1QCHhAZ1QbrvCH9A+hQZvEaOqOo=
References:
<9A40B203D9AEE64B9BEC382D7F314D38075579F8@fmsmsx407.amr.corp.intel.com>
Return-Path: users-return-37329-xiamak=hotmail.com@subversion.tigris.org
X-OriginalArrivalTime: 23 Aug 2005 19:05:35.0649 (UTC)
FILETIME=[A46FB110:01C5A815]

Several things to look for:

* post-commit calls "commit-email.pl"
* post-commit has execute permission
* post-commit has the correct shebang on top (I had mine as #!
/usr/bin/perl, but it should have been #! /bin/perl).
* You have the full PATH in for your commit-email.pl program in the
post-commit script because Subversion clears out the PATH variable
before calling post-commit.

Here's a trick you can do: Make sure that the post-commit script exits
with a status of "2" instead of "0". That way, Subversion will detect
a failure and send you the output of STDERR.

On 8/23/05, Burgan, DeborahX <deborahx.burgan@intel.com> wrote:
>
> I have setup the commit-email.pl and the post-commit file with the
> appropriate information and if I enter this from a cmd line
>
> [servername:/nfs/dp/proj/vt/itp/svn/repos/source/hooks] >>perl
> commit-email.pl /nfs/dp/proj/vt/itp/svn/repos/source 800 -s
> SVN:project-source deborahx.burgan@intel.com
>
> It works great but when we checkin code it doesn't work automatically.
> Is there something else I need to do?
>
> commet-email.pl
> # Sendmail path.
> my $sendmail = "/usr/sbin/sendmail";
>
> # Svnlook path.
> my $svnlook = "/nfs/dp/proj/vt/itp/svn/SubVersion/bin/svnlook";
>
> post-commit
> REPOS="$1"
> TXN="$2"
>
> commit-email.pl "$REPOS" "$REV" -s SVN: deborahx.burgan@intel.com
>
>
>
> Thanks
>
> Debbie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

--
--
David Weintraub
qazwart@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Aug 29 21:41:08 2005

This is an archived mail posted to the Subversion Users mailing list.