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

Re: Re: "Advanced" problems with post-commit

From: Bob Proulx <bob_at_proulx.com>
Date: 2006-07-09 20:34:38 CEST

Michael Pfeiffer wrote:
> Ryan Schmidt wrote:
> > > - edited commit-email.pl to use absolute paths for sendmail and
> > > svnlook

Those scripts already have the absolute paths for sendmail and
svnlook. You should not need to do this *again*. This makes me
wonder what version of subversion you are actually using? Because if
you are needing to do this then you must be using a different version
than one that us on the mailing list would consider a good one.

Here is what I see in my copy of commit-email.pl:

  # Sendmail path.
  my $sendmail = "/usr/sbin/sendmail";

  # Svnlook path.
  my $svnlook = "/usr/bin/svnlook";

Why is yours different?

> > > - edited commit-email.pl at the first appearance of $repos, here I
> > > had to set the absolute path to my repository directory to let
> > > svnlook find there pository handed over as $repos
> >
> > I'm not sure why you're having to edit commit-email.pl. It's supposed
> > to be a self-contained script that just works.

Agreed. The $repos is passed into the script by the post-commit hook
script. If you are modifying it then what happens when the passed in
"$REPOS" argument is passed in?

> When I don't set the absolute path it doesn't finds the repository
> when I call it from command line. May be thats because I use an own,
> specific path where the reops are located at?

Perhaps you are trying to invoke the post-commit script differently
than subversion is trying to invoke it? You should test using the
same arguments. This is in the example post-commit.tmpl file:


  /usr/lib/subversion/hook-scripts/commit-email.pl "$REPOS" "$REV" commit-watchers@example.org

> > If you run "env -i ./post-commit" on the command line, does it still
> > work? "env -i" ignores environment variables. So if it then fails to
> > work, you may still have relative paths around somewhere.

I think you need these arguments:

  env -i post-commit $REPOS $REV

For example:

  env -i post-commit /srv/svn/myproj 42

> That works - at least when I have this abolute repository path
> thingy inside the script.

Then that must be the problem. You need to invoke it when testing
with the path to the repository and the revision number.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Jul 9 20:35:42 2006

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