Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: hook on commit problem/bug

Project highlights: :. Download .: :. Support .: :. FAQ .: :. Translations .: :. Donate .: :. Report Bug .:

tortoisesvn
Discussion topic

Hide all messages in topic

All messages in topic

Re: Hook on commit problem/bug

Author steveking
Full name Stefan Küng
Date 2009-04-02 08:44:50 PDT
Message webpost at tigris dot org wrote:
> BTW - I'm still having this issue but ONLY on my Vista computer.
>
> Can make ANY script (e.g. batch file which returns 0) and it will fail only on pre-commit. Same scripts work on all other events.
>
> NOTE: Originally the fix was due to deleted files, in this case I just have 1 changed file, no deletions or anything else.
>
> TortoiseSVN 1.6.0, Build 15855 - 32 Bit , 2009/03/21 12:36:36
> Subversion 1.6.0,
> apr 1.3.3
> apr-utils 1.3.4
> neon 0.28.4
> OpenSSL 0.9.8j 07 Jan 2009
> zlib 1.2.3
>
>
>> postmaster at tigris dot org wrote:
>>> I'm afraid this problem is still there. I have build 14908.
>> If you read this thread, you will notice that I mentioned that I fixed
>> this issue. If you still have problems with a hook script, please
>> provide more information. Something must be different because the
>> reported issue *is* fixed (I wouldn't have said so otherwise).
>>
>> So, please provide an *exact* and *detailed* recipe on how to reproduce
>> your problem.

See my comment here?

Just repeating "doesn't work" won't help.


Stefan


--
       ___
  oo // \\ "De Chelonian Mobile"
 (_,\/ \_/ \ TortoiseSVN
   \ \_/_\_/> The coolest Interface to (Sub)Version Control
   /_/ \_\ http://tortoisesvn.net
Attachments

RE: Hook on commit problem/bug

Author webpost at tigris dot org
Full name webpost at tigris dot org
Date 2009-04-01 18:39:29 PDT
Message BTW - I'm still having this issue but ONLY on my Vista computer.

Can make ANY script (e.g. batch file which returns 0) and it will fail only on pre-commit. Same scripts work on all other events.

NOTE: Originally the fix was due to deleted files, in this case I just have 1 changed file, no deletions or anything else.

TortoiseSVN 1.6.0, Build 15855 - 32 Bit , 2009/03/21 12:36:36
Subversion 1.6.0,
apr 1.3.3
apr-utils 1.3.4
neon 0.28.4
OpenSSL 0.9.8j 07 Jan 2009
zlib 1.2.3


> postmaster at tigris dot org wrote:
> > I'm afraid this problem is still there. I have build 14908.
>
> If you read this thread, you will notice that I mentioned that I fixed
> this issue. If you still have problems with a hook script, please
> provide more information. Something must be different because the
> reported issue *is* fixed (I wouldn't have said so otherwise).
>
> So, please provide an *exact* and *detailed* recipe on how to reproduce
> your problem.
>
> Stefan
>
> --
> ___
> oo // \\ "De Chelonian Mobile"
> (_,\/ \_/ \ TortoiseSVN
> \ \_/_\_/> The coolest Interface to (Sub)Version Control
> /_/ \_\ http://tortoisesvn.net

Re: hook on commit problem/bug

Author steveking
Full name Stefan Küng
Date 2009-01-06 09:43:44 PST
Message postmaster at tigris dot org wrote:
> I'm afraid this problem is still there. I have build 14908.

If you read this thread, you will notice that I mentioned that I fixed
this issue. If you still have problems with a hook script, please
provide more information. Something must be different because the
reported issue *is* fixed (I wouldn't have said so otherwise).

So, please provide an *exact* and *detailed* recipe on how to reproduce
your problem.

Stefan

--
       ___
  oo // \\ "De Chelonian Mobile"
 (_,\/ \_/ \ TortoiseSVN
   \ \_/_\_/> The coolest Interface to (Sub)Version Control
   /_/ \_\ http://tortoisesvn.net
Attachments

Re: hook on commit problem/bug

Author Kurt Pruenner <leak at gmx dot at>
Full name Kurt Pruenner <leak at gmx dot at>
Date 2009-01-06 05:33:11 PST
Message postmaster at tigris dot org wrote:
> I'm afraid this problem is still there. I have build 14908.

14908 was a revision of the 1.5.x branch. All changes go into the trunk,
so you probably should try a recent trunk build:

    http://nightlybuilds​.tortoisesvn.net/lat​est/win32/

--
Kurt Bernhard Pruenner --- Haendelstrasse 17 --- 4020 Linz --- Austria
.......It might be written "Mindfuck", but it's spelt "L-A-I-N".......
np: The Notwist - On Planet Off (The Devil, You + Me)

RE: Re: hook on commit problem/bug

Author postmaster at tigris dot org
Full name postmaster at tigris dot org
Date 2009-01-06 04:42:29 PST
Message I'm afraid this problem is still there. I have build 14908.

Re: hook on commit problem/bug

Author steveking
Full name Stefan Küng
Date 2008-11-03 10:15:31 PST
Message decybel brzeszczot wrote:
> hi
> problem is the same as previous:
>
> -I add something.txt file to project.
> -commit - ( work fine, commit done)
> -delete "something.txt"
> -commit ( Error: The hook script returned an error:)
>
> hook on pre-commit

Fixed in r14510.

Stefan


--
       ___
  oo // \\ "De Chelonian Mobile"
 (_,\/ \_/ \ TortoiseSVN
   \ \_/_\_/> The coolest Interface to (Sub)Version Control
   /_/ \_\ http://tortoisesvn.net
Attachments

Re: hook on commit problem/bug

Author decybel brzeszczot <d dot grzeszczak at gmail dot com>
Full name decybel brzeszczot <d dot grzeszczak at gmail dot com>
Date 2008-11-03 03:47:34 PST
Message hi
problem is the same as previous:

-I add something.txt file to project.
-commit - ( work fine, commit done)
-delete "something.txt"
-commit ( Error: The hook script returned an error:)

hook on pre-commit

PS: post commit works fine

On 3 Lis, 11:50, Stefan Küng <tortoise...@gmail.com> wrote:
> decybel brzeszczot wrote:
> > ok I know where problem is. Problem is on pre-commit, i didn't check
> > start-commit. On post-commit everything work fine.
>
> What's the problem in pre-commit?
>
> Stefan
>
> --
>        ___
>   oo  // \\      "De Chelonian Mobile"
>  (_,\/ \_/ \     TortoiseSVN
>    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
>    /_/   \_\    http://tortoisesvn.net
>
>  signature.asc
> < 1KViewDownload

Re: hook on commit problem/bug

Author steveking
Full name Stefan Küng
Date 2008-11-03 02:50:45 PST
Message decybel brzeszczot wrote:
> ok I know where problem is. Problem is on pre-commit, i didn't check
> start-commit. On post-commit everything work fine.

What's the problem in pre-commit?

Stefan



--
       ___
  oo // \\ "De Chelonian Mobile"
 (_,\/ \_/ \ TortoiseSVN
   \ \_/_\_/> The coolest Interface to (Sub)Version Control
   /_/ \_\ http://tortoisesvn.net
Attachments

Re: hook on commit problem/bug

Author decybel brzeszczot <d dot grzeszczak at gmail dot com>
Full name decybel brzeszczot <d dot grzeszczak at gmail dot com>
Date 2008-11-03 02:39:20 PST
Message ok I know where problem is. Problem is on pre-commit, i didn't check
start-commit. On post-commit everything work fine.

On 3 Lis, 11:26, Stefan Küng <tortoise...@gmail.com> wrote:
> decybel brzeszczot wrote:
> > thanks
>
> > what build I must download because i dovload verion:
> > TortoiseSVN 1.5.99, Build 14501 - 32 Bit -dev, 2008/11/02 20:36:13
> > and the problem still exist ;/
>
> If you have build 14501, then the problem you've reported before is
> fixed. If you still have issues, then it's another problem. Please
> provide the steps you did and your test script.
>
> Stefan
>
> --
>        ___
>   oo  // \\      "De Chelonian Mobile"
>  (_,\/ \_/ \     TortoiseSVN
>    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
>    /_/   \_\    http://tortoisesvn.net
>
>  signature.asc
> < 1KViewDownload

Re: hook on commit problem/bug

Author steveking
Full name Stefan Küng
Date 2008-11-03 02:26:41 PST
Message decybel brzeszczot wrote:
> thanks
>
> what build I must download because i dovload verion:
> TortoiseSVN 1.5.99, Build 14501 - 32 Bit -dev, 2008/11/02 20:36:13
> and the problem still exist ;/

If you have build 14501, then the problem you've reported before is
fixed. If you still have issues, then it's another problem. Please
provide the steps you did and your test script.

Stefan


--
       ___
  oo // \\ "De Chelonian Mobile"
 (_,\/ \_/ \ TortoiseSVN
   \ \_/_\_/> The coolest Interface to (Sub)Version Control
   /_/ \_\ http://tortoisesvn.net
Attachments

Re: hook on commit problem/bug

Author decybel brzeszczot <d dot grzeszczak at gmail dot com>
Full name decybel brzeszczot <d dot grzeszczak at gmail dot com>
Date 2008-11-03 02:17:44 PST
Message thanks

what build I must download because i dovload verion:
TortoiseSVN 1.5.99, Build 14501 - 32 Bit -dev, 2008/11/02 20:36:13
and the problem still exist ;/

On 31 Paź, 18:17, Stefan Küng <tortoise...@gmail.com> wrote:
> decybel brzeszczot wrote:
> > oh so I see that nobody check on real but only talking and
> > talking ;).
>
> Sorry.
>
>
>
> > Script not even start so how can it know returned value ( what for is
> > option "wait for the script to finish" ? when this option is not
> > checked tortoise don't know reurned value ).
>
> > My last test was as you wrote and like is in contrib dir:
> > - script.js
>
> > WScript.Echo("working");
> > WScript.Quit(0);
>
> > as you see always return 0 that mean true
> > -in tortoise settings:
> >                   wscript C:\script.js
> >   and checked "wait for the script to finish"
> > -Now I add something.txt file to project.
> > -commit - ( work fine, commit done)
> > -delete "something.txt"
> > -commit ( Error: The hook script returned an error:)
>
> Fixed in r14460.
> For those interested: this only happens if only deletions are committed
> (i.e., the paths committed don't exist).
>
> Stefan
>
> --
>        ___
>   oo  // \\      "De Chelonian Mobile"
>  (_,\/ \_/ \     TortoiseSVN
>    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
>    /_/   \_\    http://tortoisesvn.net
>
>  signature.asc
> < 1KViewDownload

Re: hook on commit problem/bug

Author steveking
Full name Stefan Küng
Date 2008-10-31 10:17:05 PDT
Message decybel brzeszczot wrote:

> oh so I see that nobody check on real but only talking and
> talking ;).

Sorry.

> Script not even start so how can it know returned value ( what for is
> option "wait for the script to finish" ? when this option is not
> checked tortoise don't know reurned value ).
>
> My last test was as you wrote and like is in contrib dir:
> - script.js
>
> WScript.Echo("working");
> WScript.Quit(0);
>
> as you see always return 0 that mean true
> -in tortoise settings:
> wscript C:\script.js
> and checked "wait for the script to finish"
> -Now I add something.txt file to project.
> -commit - ( work fine, commit done)
> -delete "something.txt"
> -commit ( Error: The hook script returned an error:)

Fixed in r14460.
For those interested: this only happens if only deletions are committed
(i.e., the paths committed don't exist).

Stefan

--
       ___
  oo // \\ "De Chelonian Mobile"
 (_,\/ \_/ \ TortoiseSVN
   \ \_/_\_/> The coolest Interface to (Sub)Version Control
   /_/ \_\ http://tortoisesvn.net
Attachments

Re: hook on commit problem/bug

Author decybel brzeszczot <d dot grzeszczak at gmail dot com>
Full name decybel brzeszczot <d dot grzeszczak at gmail dot com>
Date 2008-10-30 14:14:40 PDT
Message On 30 Paź, 20:28, Stefan Küng <tortoise...@gmail.com> wrote:
> decybel brzeszczot wrote:
> > so ok I understand that you don't know solution or I don't understad
> > you.
>
> > Forgot email notification. For example I want open notepad when I
> > commit project. What for ? I don't know ? I want ;)
> > -I go to Tortoise setting.
> > -I add hook on project and in "Command line to excecute" i write
> > "notepad".
> > -Now I add something.txt file to project.
> > -commit - ( work fine, commit done, notepad is on my screen)
> > -delete "something.txt"
> > -commit ( Error: The hook script returned an error:)
>
> As the docs clearly state, the hook script MUST return a value to
> indicate error or success. And an error message must be written to stderr.
>
> An empty bat file or some random exe won't do.
>
> If you want to use an example bat file, use one with the following line
> in it:
>
> exit 0
>
> or
>
> exit 1
>
> You can find example script in our contrib folder.
>
> Stefan
>
> --
>        ___
>   oo  // \\      "De Chelonian Mobile"
>  (_,\/ \_/ \     TortoiseSVN
>    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
>    /_/   \_\    http://tortoisesvn.net
>
>  signature.asc
> < 1KViewDownload

oh so I see that nobody check on real but only talking and
talking ;).

Script not even start so how can it know returned value ( what for is
option "wait for the script to finish" ? when this option is not
checked tortoise don't know reurned value ).

My last test was as you wrote and like is in contrib dir:
- script.js

WScript.Echo("working");
WScript.Quit(0);

as you see always return 0 that mean true
-in tortoise settings:
                  wscript C:\script.js
  and checked "wait for the script to finish"
-Now I add something.txt file to project.
-commit - ( work fine, commit done)
-delete "something.txt"
-commit ( Error: The hook script returned an error:)

what I am doing wrong ? I think it is a bug. My version TortoiseSVN
1.5.5, Build 14361 - 32 Bit , 2008/10/24 18:06:34

Thanks

Re: hook on commit problem/bug

Author steveking
Full name Stefan Küng
Date 2008-10-30 12:28:32 PDT
Message decybel brzeszczot wrote:
> so ok I understand that you don't know solution or I don't understad
> you.
>
> Forgot email notification. For example I want open notepad when I
> commit project. What for ? I don't know ? I want ;)
> -I go to Tortoise setting.
> -I add hook on project and in "Command line to excecute" i write
> "notepad".
> -Now I add something.txt file to project.
> -commit - ( work fine, commit done, notepad is on my screen)
> -delete "something.txt"
> -commit ( Error: The hook script returned an error:)

As the docs clearly state, the hook script MUST return a value to
indicate error or success. And an error message must be written to stderr.

An empty bat file or some random exe won't do.

If you want to use an example bat file, use one with the following line
in it:

exit 0

or

exit 1


You can find example script in our contrib folder.

Stefan

--
       ___
  oo // \\ "De Chelonian Mobile"
 (_,\/ \_/ \ TortoiseSVN
   \ \_/_\_/> The coolest Interface to (Sub)Version Control
   /_/ \_\ http://tortoisesvn.net
Attachments

Re: hook on commit problem/bug

Author decybel brzeszczot <d dot grzeszczak at gmail dot com>
Full name decybel brzeszczot <d dot grzeszczak at gmail dot com>
Date 2008-10-30 12:18:17 PDT
Message so ok I understand that you don't know solution or I don't understad
you.

Forgot email notification. For example I want open notepad when I
commit project. What for ? I don't know ? I want ;)
-I go to Tortoise setting.
-I add hook on project and in "Command line to excecute" i write
"notepad".
-Now I add something.txt file to project.
-commit - ( work fine, commit done, notepad is on my screen)
-delete "something.txt"
-commit ( Error: The hook script returned an error:)

On 30 Paź, 20:05, "Andy Levy" <andy.l...@gmail.com> wrote:
> 2008/10/30 decybel brzeszczot <d.grzeszc...@gmail.com>:
>
>
>
> > On 30 Paź, 19:46, "Andy Levy" <andy.l...@gmail.com> wrote:
> >> On Thu, Oct 30, 2008 at 14:38, decybel brzeszczot
>
> >> <d.grzeszc...@gmail.com> wrote:
> >> > First, sorry for my english.
>
> >> > I have a problem. I want to do hook that will send mail that commit
> >> > was done.
>
> >> > When i add files commit is done and hook is working. It also work when
> >> > I modified some files but when I only delete one file (nothing else
> >> > changed or added ) I have message:
>
> >> > Error: The hook script returned an error:
>
> >> > Hook is on pre-commit but this same is on post-commit
>
> >> Repository hook scripts run on the server and thus are more
> >> appropriate on the Subversion Users mailing list. If you're asking for
> >> help with figuring out why your hook script is failing, no one can
> >> help you if you don't show the code of the script itself. That would
> >> be like asking your doctor to diagnose abdominal pain without allowing
> >> him to examine you.
>
> >> There are quite a few email notification hook scripts one can find
> >> with simple Google searches, and even in the Contrib directory of the
> >> Subversion repository itself. Some more configurable than others
> >> (without modifying large amounts of code yourself).
>
> >> --------------------​--------------------​--------------------​---------
> >> To unsubscribe, e-mail: users-unsubscr...@to​rtoisesvn.tigris.org​
> >> For additional commands, e-mail: users-h...@tortoises​vn.tigris.org
>
> > Hi
>
> > Why are you thinking that I want to do hook on server side ? I didn't
> > what this solusion. I want use a hook possibility that is in
> > tortoiseSVN settings.
>
> Such a notification is normally done on the server so that you don't
> have to customize the end-user's settings and the process can be
> tightly controlled. Also, many organizations do not allow SMTP traffic
> directly from desktops, because such activity is frequently a sign of
> malware, not legitimate activity.

Re: hook on commit problem/bug

Author Andy Levy <andy dot levy at gmail dot com>
Full name Andy Levy <andy dot levy at gmail dot com>
Date 2008-10-30 12:05:08 PDT
Message 2008/10/30 decybel brzeszczot <d dot grzeszczak at gmail dot com>:
> On 30 Paź, 19:46, "Andy Levy" <andy.l...@gmail.com> wrote:
>> On Thu, Oct 30, 2008 at 14:38, decybel brzeszczot
>>
>> <d.grzeszc...@gmail.com> wrote:
>> > First, sorry for my english.
>>
>> > I have a problem. I want to do hook that will send mail that commit
>> > was done.
>>
>> > When i add files commit is done and hook is working. It also work when
>> > I modified some files but when I only delete one file (nothing else
>> > changed or added ) I have message:
>>
>> > Error: The hook script returned an error:
>>
>> > Hook is on pre-commit but this same is on post-commit
>>
>> Repository hook scripts run on the server and thus are more
>> appropriate on the Subversion Users mailing list. If you're asking for
>> help with figuring out why your hook script is failing, no one can
>> help you if you don't show the code of the script itself. That would
>> be like asking your doctor to diagnose abdominal pain without allowing
>> him to examine you.
>>
>> There are quite a few email notification hook scripts one can find
>> with simple Google searches, and even in the Contrib directory of the
>> Subversion repository itself. Some more configurable than others
>> (without modifying large amounts of code yourself).
>>
>> --------------------​--------------------​--------------------​---------
>> To unsubscribe, e-mail: users-unsubscr...@to​rtoisesvn.tigris.org​
>> For additional commands, e-mail: users-h...@tortoises​vn.tigris.org
>
> Hi
>
> Why are you thinking that I want to do hook on server side ? I didn't
> what this solusion. I want use a hook possibility that is in
> tortoiseSVN settings.

Such a notification is normally done on the server so that you don't
have to customize the end-user's settings and the process can be
tightly controlled. Also, many organizations do not allow SMTP traffic
directly from desktops, because such activity is frequently a sign of
malware, not legitimate activity.

Re: hook on commit problem/bug

Author decybel brzeszczot <d dot grzeszczak at gmail dot com>
Full name decybel brzeszczot <d dot grzeszczak at gmail dot com>
Date 2008-10-30 12:01:44 PDT
Message On 30 Paź, 19:46, "Andy Levy" <andy.l...@gmail.com> wrote:
> On Thu, Oct 30, 2008 at 14:38, decybel brzeszczot
>
> <d.grzeszc...@gmail.com> wrote:
> > First, sorry for my english.
>
> > I have a problem. I want to do hook that will send mail that commit
> > was done.
>
> > When i add files commit is done and hook is working. It also work when
> > I modified some files but when I only delete one file (nothing else
> > changed or added ) I have message:
>
> > Error: The hook script returned an error:
>
> > Hook is on pre-commit but this same is on post-commit
>
> Repository hook scripts run on the server and thus are more
> appropriate on the Subversion Users mailing list. If you're asking for
> help with figuring out why your hook script is failing, no one can
> help you if you don't show the code of the script itself. That would
> be like asking your doctor to diagnose abdominal pain without allowing
> him to examine you.
>
> There are quite a few email notification hook scripts one can find
> with simple Google searches, and even in the Contrib directory of the
> Subversion repository itself. Some more configurable than others
> (without modifying large amounts of code yourself).
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscr...@to​rtoisesvn.tigris.org​
> For additional commands, e-mail: users-h...@tortoises​vn.tigris.org

Hi

Why are you thinking that I want to do hook on server side ? I didn't
what this solusion. I want use a hook possibility that is in
tortoiseSVN settings. The script doesn' metter for example empty .bat
file that do nothing.

- add hook in tortoiseSVN setting ( emty bat file for a script )
- add file to repository
- commit ( everything is fine , batch was running )
- remove added file
- commit ( Error: The hook script returned an error: )

Re: hook on commit problem/bug

Author Andy Levy <andy dot levy at gmail dot com>
Full name Andy Levy <andy dot levy at gmail dot com>
Date 2008-10-30 11:46:44 PDT
Message On Thu, Oct 30, 2008 at 14:38, decybel brzeszczot
<d dot grzeszczak at gmail dot com> wrote:
> First, sorry for my english.
>
> I have a problem. I want to do hook that will send mail that commit
> was done.
>
> When i add files commit is done and hook is working. It also work when
> I modified some files but when I only delete one file (nothing else
> changed or added ) I have message:
>
> Error: The hook script returned an error:
>
> Hook is on pre-commit but this same is on post-commit

Repository hook scripts run on the server and thus are more
appropriate on the Subversion Users mailing list. If you're asking for
help with figuring out why your hook script is failing, no one can
help you if you don't show the code of the script itself. That would
be like asking your doctor to diagnose abdominal pain without allowing
him to examine you.

There are quite a few email notification hook scripts one can find
with simple Google searches, and even in the Contrib directory of the
Subversion repository itself. Some more configurable than others
(without modifying large amounts of code yourself).

hook on commit problem/bug

Author decybel brzeszczot <d dot grzeszczak at gmail dot com>
Full name decybel brzeszczot <d dot grzeszczak at gmail dot com>
Date 2008-10-30 11:38:21 PDT
Message First, sorry for my english.

I have a problem. I want to do hook that will send mail that commit
was done.

When i add files commit is done and hook is working. It also work when
I modified some files but when I only delete one file (nothing else
changed or added ) I have message:

Error: The hook script returned an error:

Hook is on pre-commit but this same is on post-commit

Thanks
Darek
Messages per page: