You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by paptimusx <pa...@gmail.com> on 2008/04/22 07:30:55 UTC

pre-commit hooks extra argument

Hello, there.

There is a doubt in the argument that 'pre-commit.bat' receives.

#1 -> "c:/var/svn/svnrepo"
#2 -> "9609-1"

I think '-1' of the second argument is extra. It makes svn-notify malfunctions.

?? svnnotify --repos-path PATH -r 9609-1 ...
=> svnnotify --repos-path PATH -r 9609   ...

How should I do?

Thanks in advance.

% ver
Microsoft Windows XP [Version 5.1.2600]
% svnnotify -v
svnnotify 2.64
% svn --version
svn, version 1.4.6 (r28521)
   compiled Dec 20 2007, 16:33:06

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

Re: pre-commit hooks extra argument

Posted by paptimusx <pa...@gmail.com>.
I am sorry.
Not pre-commitk but post-commit of a set place seems to be correct.

It is not ml but having replied directly is a mistake, too.
(It is necessary to rewrite the address in g-mail)

thank you.

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

Re: pre-commit hooks extra argument

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 22, 2008, at 5:28 AM, paptimusx wrote:

>> 9609-1" is not a revision number (using the -r parameter), it is
>> a transaction number (you use the -t parameter). At least, you
>> would with svnadmin. Not sure if svnnotify supports the -t
>> parameter. If in doubt, consult the svnnotify documentation or
>> contact the authors of svnnotify.
>
> -t?  what is the transaction number?
> In the option of svnnotify, -t means '--to ADDRESS'
>
> svnnotify --help
>          :
>  -r --revision REVISION       Commit revision number. Required.
>  -t --to ADDRESS              The notification destination email  
> address.
>
> thank you.

Looks like svnnotify does not support acting on transactions, only on  
revisions. So you will need to call svnnotify from the post-commit  
hook then, not the pre-commit hook. At pre-commit hook time, the  
transaction has not yet been accepted and has not yet been assigned a  
revision number. At post-commit time it has.

Don't forget to Reply All so your reply goes to the list too, not  
just to me.


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

Re: pre-commit hooks extra argument

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 22, 2008, at 2:30 AM, paptimusx wrote:

> There is a doubt in the argument that 'pre-commit.bat' receives.
>
> #1 -> "c:/var/svn/svnrepo"
> #2 -> "9609-1"
>
> I think '-1' of the second argument is extra. It makes svn-notify  
> malfunctions.
>
> ?? svnnotify --repos-path PATH -r 9609-1 ...
> => svnnotify --repos-path PATH -r 9609   ...
>
> How should I do?

"9609-1" is not a revision number (using the -r parameter), it is a  
transaction number (you use the -t parameter). At least, you would  
with svnadmin. Not sure if svnnotify supports the -t parameter. If in  
doubt, consult the svnnotify documentation or contact the authors of  
svnnotify.


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

Re: pre-commit hooks extra argument

Posted by Hari Kodungallur <hk...@gmail.com>.
On Tue, Apr 22, 2008 at 12:30 AM, paptimusx <pa...@gmail.com> wrote:

> Hello, there.
>
> There is a doubt in the argument that 'pre-commit.bat' receives.
>
> #1 -> "c:/var/svn/svnrepo"
> #2 -> "9609-1"
>
> I think '-1' of the second argument is extra. It makes svn-notify
> malfunctions.
>
> ?? svnnotify --repos-path PATH -r 9609-1 ...
> => svnnotify --repos-path PATH -r 9609   ...
>
> How should I do?
>
> Thanks in advance.
>
> % ver
> Microsoft Windows XP [Version 5.1.2600]
> % svnnotify -v
> svnnotify 2.64
> % svn --version
> svn, version 1.4.6 (r28521)
>   compiled Dec 20 2007, 16:33:06



Note that pre-commit is called before the commit actually happens. That is
the reason why you have the "-1" against the 'potential' revision number.
This is called the transaction number. A revision number can be obtained
only after the commit it complete.

I think svnnotify is a tool to notify others of commit activity within svn.
In which case you should use svnnotify within a post-commit (that is what
the docs of svnnotify asks you as well).

Regards,
-Hari