You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Boris Stumm <st...@informatik.uni-kl.de> on 2006/05/03 16:14:08 UTC

Strange pre-commit-hook behaviour

Hi,

I get some strange behaviour of the pre-commit hook.
After trying out some things, I am finally there:

----------
#!/bin/bash
echo "foo" >> /tmp/test
exit 1
echo "bar" >> /tmp/test
----------

results in only "foo" getting into the test file. That means,
the hook gets executed and in theory, all is fine.

But the commit is not rejected. Either I am making some really dumb
mistake (which I hope in this case), or there is something really wrong
here. Anyone has an idea?

Some System Details:
Suse 9.2, with self-compiled Subversion 1.3.0. Access over https with
Apache.

Thanks for the help,
Boris Stumm

-- 
Dipl. Inf. Boris Stumm, Technische Universität Kaiserslautern
http://wwwhis.informatik.uni-kl.de/aghis/staff/Stumm/
Und für alle, die mir Emails schreiben wollen:
http://learn.to/quote

Re: Strange pre-commit-hook behaviour

Posted by Boris Stumm <st...@informatik.uni-kl.de>.
Am Mittwoch, 3. Mai 2006 18:31 schrieben Sie:
> Boris Stumm wrote:
> > I get some strange behaviour of the pre-commit hook.
> > After trying out some things, I am finally there:
> > ----------
> > #!/bin/bash
> > echo "foo" >> /tmp/test
> > exit 1
> > echo "bar" >> /tmp/test
> > ----------
> > results in only "foo" getting into the test file. That means,
> > the hook gets executed and in theory, all is fine.
> >
> > But the commit is not rejected. Either I am making some really dumb
>
> I have had problems with a similar setup:
[...]
> Pre-commit hooks showed a strange behaviour when mod_php was running at
> the same time. It was the opposite - hooks failed although they got
> executed and reached an "exit 0" statement. I couldn't figure out what
> the real problem was. My guess was that something deep down inside the
> system was borked.
>
> For me restarting apache cured the problem for a while but as long as
> php was running it returned sooner or later. With php disabled it's
> running stable.

Indeed, a restart seems to helps. I'll see how long it lasts. Thanks
for the help.

Regards,
Boris Stumm
-- 
Dipl. Inf. Boris Stumm, Technische Universität Kaiserslautern
http://wwwhis.informatik.uni-kl.de/aghis/staff/Stumm/
Und für alle, die mir Emails schreiben wollen:
http://learn.to/quote

Re: Strange pre-commit-hook behaviour

Posted by Markus Henschel <ma...@gmx.de>.

Boris Stumm wrote:
> Hi,
> 
> I get some strange behaviour of the pre-commit hook.
> After trying out some things, I am finally there:
> 
> ----------
> #!/bin/bash
> echo "foo" >> /tmp/test
> exit 1
> echo "bar" >> /tmp/test
> ----------
> 
> results in only "foo" getting into the test file. That means,
> the hook gets executed and in theory, all is fine.
> 
> But the commit is not rejected. Either I am making some really dumb
> mistake (which I hope in this case), or there is something really wrong
> here. Anyone has an idea?
> 
> Some System Details:
> Suse 9.2, with self-compiled Subversion 1.3.0. Access over https with
> Apache.

I have had problems with a similar setup:
Suse 9.2
Apache 2.0.50 and 2.2
subversion 1.30 and 1.31

Pre-commit hooks showed a strange behaviour when mod_php was running at 
the same time. It was the opposite - hooks failed although they got 
executed and reached an "exit 0" statement. I couldn't figure out what 
the real problem was. My guess was that something deep down inside the 
system was borked.

For me restarting apache cured the problem for a while but as long as 
php was running it returned sooner or later. With php disabled it's 
running stable.

Regards,

Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Strange pre-commit-hook behaviour

Posted by Boris Stumm <st...@gmx.net>.
Am Mittwoch, 3. Mai 2006 20:20 schrieb Rainer Sokoll:
> On Wed, May 03, 2006 at 06:14:08PM +0200, Boris Stumm wrote:
> > I get some strange behaviour of the pre-commit hook.
> > After trying out some things, I am finally there:
> >
> > ----------
> > #!/bin/bash
> > echo "foo" >> /tmp/test
> > exit 1
> > echo "bar" >> /tmp/test
> > ----------
> >
> > results in only "foo" getting into the test file. That means,
> > the hook gets executed and in theory, all is fine.
> >
> > But the commit is not rejected. Either I am making some really dumb
> > mistake (which I hope in this case), or there is something really wrong
> > here. Anyone has an idea?
>
> Is it really pre-commit, not post-commit?

yes.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Strange pre-commit-hook behaviour

Posted by Rainer Sokoll <R....@intershop.de>.
On Wed, May 03, 2006 at 06:14:08PM +0200, Boris Stumm wrote:

> I get some strange behaviour of the pre-commit hook.
> After trying out some things, I am finally there:
> 
> ----------
> #!/bin/bash
> echo "foo" >> /tmp/test
> exit 1
> echo "bar" >> /tmp/test
> ----------
> 
> results in only "foo" getting into the test file. That means,
> the hook gets executed and in theory, all is fine.
> 
> But the commit is not rejected. Either I am making some really dumb
> mistake (which I hope in this case), or there is something really wrong
> here. Anyone has an idea?

Is it really pre-commit, not post-commit?

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org