svn-hooks

Why do I get 'Bad file descriptor' when trying sys.stdin.read() in subversion pre-revprop-change py script?

女生的网名这么多〃 提交于 2019-12-23 19:34:56
问题 I'm trying pre-revprop-change hook script on a Windows machine, but find a tough problem. I distill my problem to the following scenario: I have C:\csvn\data\repositories\tr1\hooks\pre-revprop-change.bat with content: D:\svntest\testhook.py %* exit %ERRORLEVEL% testhook.py is: import os, sys if __name__ == '__main__': # sys.stderr.write(sys.version+'\n') # this is OK, tried. newtext = sys.stdin.read() # try to read new log message sys.stderr.write('newtext is: %s\n'%newtext) exit(2) However,

Perl SVN hook with czech characters

时光毁灭记忆、已成空白 提交于 2019-12-22 17:31:10
问题 I downloaded the sample SVN post-commit hook provided by Slack integration. #!/usr/bin/perl use warnings; use strict; use HTTP::Request::Common qw(POST); use HTTP::Status qw(is_client_error); use LWP::UserAgent; use JSON; my $repository = "myrepo"; my $websvn = "websvn.mydomain.com"; my $opt_domain = "myteam.slack.com"; my $opt_token = "mytoken"; my $log = qx|export LC_ALL="cs_CZ.UTF-8"; /usr/bin/svnlook log -r $ARGV[1] $ARGV[0]|; my $log = $log." ".unpack('H*',$log); my $who = `/usr/bin

Is there a Subversion Checkout Hook or something similar?

£可爱£侵袭症+ 提交于 2019-12-22 12:43:20
问题 I'm using a subversion repository and I want to know whenever somebody asks my repository for a checkout; like a 'svn co' or an 'svn up'. Is there a hook or some other method that I can use so that a script is run, or email sent, whenever somebody requests information from my svn server? How can I achieve this without relying on apache logs? BTW it is a pretty simple repository just meant for Educational purposes. (If you need more information then just ask. Thanks in advance.) 回答1: The

Is there a Subversion Checkout Hook or something similar?

不想你离开。 提交于 2019-12-22 12:43:07
问题 I'm using a subversion repository and I want to know whenever somebody asks my repository for a checkout; like a 'svn co' or an 'svn up'. Is there a hook or some other method that I can use so that a script is run, or email sent, whenever somebody requests information from my svn server? How can I achieve this without relying on apache logs? BTW it is a pretty simple repository just meant for Educational purposes. (If you need more information then just ask. Thanks in advance.) 回答1: The

SVN Pre Commit Hooks

别来无恙 提交于 2019-12-22 11:05:18
问题 I am currently trying to extend our already existing (and working) pre commit batch file for committing to SVN. The first part blocks any commit that does not have comments and works as expected. The second part is an attmept to block users committing SUO files, however this is currently blocking all commits. My understanding of DOs scripting isn't great so I suspect it may be my usage of the FindStr? Can anyone help? "C:\Program Files\VisualSVN Server\bin\svnlook.exe" log -t %2 %1 | FindStr

Windows Pre-commit hook for comment length Subversion

扶醉桌前 提交于 2019-12-18 10:11:44
问题 I seem to be getting nowhere with this. Either searching the web for a script, etc. Anyone got a script that you can just edit the out-of-box pre-commit.tmpl in a Windows environment that requires x chars to be entered in for a comment on commit in Tortoise Subversion globally so that all members on the team are required whereas this requirement is pushed down to the clients from SVN server? I don't know the scripting language and this should be something pretty damn simple without me taking

client side pre-commit hooks in subversion

不想你离开。 提交于 2019-12-17 20:05:28
问题 Is any way to setup pre-commit hooks on the client side with an svn client, for example through eclipse or a command line svn client ? 回答1: No. But you can alias your own script to svn, so it gets called every time you type svn . The script then calls actual svn. How about that? 回答2: Not sure if it's any help in your particular case, but TortoiseSVN (on Windows) supports client-side hooks. 来源: https://stackoverflow.com/questions/4798201/client-side-pre-commit-hooks-in-subversion

How to require commit messages in VisualSVN server?

笑着哭i 提交于 2019-12-17 17:25:16
问题 We've got VisualSVN Server set up as our Subversion server on Windows, and we use Ankhsvn + TortoiseSVN as clients on our workstations. How can you configure the server to require commit messages to be non-empty? 回答1: VisualSVN Server 3.9 provides the VisualSVNServerHooks.exe check-logmessage pre-commit hook that helps you reject commits with empty or short log messages. See the article KB140: Validating commit log messages in VisualSVN Server for instructions. Besides the built-in

Running another program in Windows bat file and not create child process

限于喜欢 提交于 2019-12-17 09:44:32
问题 I have subversion server with a post-commit hook to do something. I want the checkin finish soon, not wait the hook script. But by design, the Subversion post-commit hook script will run until all child process exit, so using somthing like: start another_prog... in the hook bat file has no use. So I want to know how to run another program in Windows bat file which not create child process or let the child process detach from the parent. 回答1: Synchronous. The second notepad won't launch until

SVN pre-commit hook for avoiding changes to tags subdirectories

こ雲淡風輕ζ 提交于 2019-12-17 05:42:06
问题 Is there anybody who has clear instructions on how to add a pre-commit hook that avoids changes to tags subdirectories? I already searched the internet quite a bit. I found this link: SVN::Hooks::DenyChanges , but I can't seem to compile things. 回答1: I don't have enough reputation to "comment" on Raim's answer above, but his worked great, with one exception, his grep pattern is wrong. I simply used the below as my pre-commit hook (I didn't have an existing one, you'd need to merge in that