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

Re: post-commit hook

From: K Y <info4km_at_yahoo.com>
Date: 2006-01-03 21:58:01 CET

Exactly. If you perform these tests in the post-commit hook, the commit of the files has completed - and then you are trying to also commit the logs afterwords (i think i understood your scenario correctly).
  With a pre-commit hook - you can check what you need - run your test shells and commit all of the changes as well as the test log files at once - if successful.

Stefan Schwarzbach <Schwarzbach@SilentDreams.de> wrote:
  Hello Victor,

ever tried to use the pre-commit hook?
I use the pre-commit hook also to do some checks, f.e. to check if the
changelog text is empty or there is a case sense conflict. If something
with the commit went wrong due to these checks, I write an error message
to stderr and exit the hook script with != 0. The client who tried to
commit his changes will get the error message I wrote to stderr as reply
to his commit trial.

I hope this helps.


Hao (Victor) Ren schrieb:
> hello,
> I am using the subversion system to run tests (the user commits some
> files (code for a program), and the server runs some tests on those
> files). We are using Post-commit hook to start running the tests on
> the server side. After the test are run, and some error log files are
> generated to indicate that certain tests are not passed, (and the
> following is the problem) the server is not able to commit those error
> log files to the repository. So, now, we are not giving the user any
> indications of what went wrong with the code. The reason is that all
> the operations on the server side are called by the Post-commit hook,
> and when the hook is called, the user is still connected to the
> repository. So the server cannot commit any files to the repository,
> because the user is still beening connected to the repository.
> I understand that an alternative is to send out emails to the user,
> and showing what when wrong. But due to various reasons, I do not want
> to implement this feature.
> So how to let the server side to commit to the repository when called
> by the Post-commit hook from subversion repository?
> Victor
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

Stefan Schwarzbach
Lead Programmer & CTO
Silent Dreams
Talhofstr. 6
82205 Gilching
+49 Germany
Tel. +49 8105 7749776
Mobil +49 179 5162222
EMail Schwarzbach@SilentDreams.de
Web www.SilentDreams.de
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 
Received on Tue Jan 3 22:24:05 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.