post-commit-hook

Git Repo Auto-commit and Push

北城余情 提交于 2019-12-24 19:38:59
问题 I have a scenario where I have a repo where users access the files directly, they don't know git exists, and make changes to what are essentially text files. I have that repo cloned. So when a commit is made, the changes are pushed to the cloned repo using the post-commit hook. Now, I have the cloned repo as a bare repo. But, what I would like to do at this point is have a script run each time a push is made. That script would read the content of the file(s) that were just pushed. Is that

How to print arguments in SVN hook

落花浮王杯 提交于 2019-12-24 13:46:06
问题 I am using windows7 and VisualSVN Server. I have wrote simple SVN post-commit hook which looks like C:\Perl64\bin\perl C:\repositories\secret-project\hooks\myhook.pl %1 %2 and myhook.pl script looks like $svnlook = '"C:\Program Files\VisualSVN Server\bin\svnlook.exe"'; $repos = $ARGV[0]; $txn = $ARGV[1]; $msg = `$svnlook changed -t "$txn" "$repos"`; chomp($msg); print STDOUT $repos . " " . $txn; print STDOUT $msg; exit(0); so basically I just want for now to print changed files. Commit goes

Post commit hook problem for

蓝咒 提交于 2019-12-23 04:58:16
问题 I want to update the files which were changed as my SVN size is 20GB. My SVN Repo is located at: /media/disk3/velsvn/projects My Checkout Folder is at: /media/disk2/www/htdocs (Reference: Using SVN post-commit hook to update only files that have been committed) My post-commit file looks like: #!/bin/bash REPOS="$1" REV="$2" cd /media/disk2/www/htdocs svnlook dirs-changed /media/disk3/velsvn/projects | xargs /usr/bin/svn up -N (I was using REPOS and REV but they were giving error so I removed

dealing with riak datatypes in postcommit hooks

核能气质少年 提交于 2019-12-14 03:53:19
问题 I am wanting to implement a postcommit hook for riak that decrements a counter in a map in another bucket. However I am having a bit of trouble dealing with the riak datatypes. Here is me attempting from riak console : (riak@127.0.0.1)9>{ok, C} = riak:local_client(). {ok,{riak_client,['riak@127.0.0.1',undefined]}} (riak@127.0.0.1)10>{ok, Obj} = C:get({<<"product">>, <<"default">>}, <<"1">>). {ok,{r_object,{<<"product">>,<<"default">>}, <<"1">>, [{r_content,{dict,5,16,16,8,80,48, {[],[],[],[],

SVN hook mailer.py configuration

≯℡__Kan透↙ 提交于 2019-12-10 16:19:15
问题 I try to set up a post-commit hook on a subversion 1.6.12 server to send a notification mail on commit. I am already using the script mailer.py (delivered by subversion team in the utils folder) with basic configuration (just send an email after each commit) and it works well. But now, I want to send a mail only when there is a commit in the /tags/ folder. This is my standard mailer.conf (that works well) : [general] smtp_hostname = xxx.xxx.xxx.xxx [defaults] from_addr = myemail@domain.tld to

svn post-commit hook : update only if certain file has changed

China☆狼群 提交于 2019-12-08 20:04:25
Okay so I have an SVN repo setup on my server. I have a post-commit hook setup that updates to a "DEV" folder so that when I commit changes, it automatically pushes to my "DEV" subdomain on my server. What I need now is an easy way to push it to my "Live" subdomain when I am ready. The "Live" subdomain is on the same server, and in reality, it would be the same svn update /... command as with the DEV, but to a different path. I was thinking I could have a specific file in my repo, and maybe I could just change this file, and then make some sort of condition in my post-commit file to also

svn post-commit hook : update only if certain file has changed

可紊 提交于 2019-12-08 05:38:23
问题 Okay so I have an SVN repo setup on my server. I have a post-commit hook setup that updates to a "DEV" folder so that when I commit changes, it automatically pushes to my "DEV" subdomain on my server. What I need now is an easy way to push it to my "Live" subdomain when I am ready. The "Live" subdomain is on the same server, and in reality, it would be the same svn update /... command as with the DEV, but to a different path. I was thinking I could have a specific file in my repo, and maybe I

Visual SVN Server: Guide on Pre/Post Commit Hooks

大憨熊 提交于 2019-12-07 14:08:54
问题 This may be best as a wiki, given comments on here: Share common / useful SVN pre-commit hooks I'm using Visual SVN 2.1.7 on a Windows 7 machine. We have developers committing from various countries and we can manage the code changes by running local copies of the changes and then uploading manually via ftp to the server for each website that's being worked on. This is an incredibly time consuming process, but less time-consuming than fixing bugs on live sites, so it's a step in the right

Visual SVN Server: Guide on Pre/Post Commit Hooks

╄→гoц情女王★ 提交于 2019-12-05 20:45:50
This may be best as a wiki, given comments on here: Share common / useful SVN pre-commit hooks I'm using Visual SVN 2.1.7 on a Windows 7 machine. We have developers committing from various countries and we can manage the code changes by running local copies of the changes and then uploading manually via ftp to the server for each website that's being worked on. This is an incredibly time consuming process, but less time-consuming than fixing bugs on live sites, so it's a step in the right direction. On the Visual SVN website it makes a mention of post-commit and pre-commit hooks but fails to

Git post commit: skip --amend and rebase

亡梦爱人 提交于 2019-12-04 20:10:15
问题 I have a post-commit hook that does stuff un ruby. It works very well but in some cases I would like to skip the code execution when I do a rebase or when I do a commit --amend. Does someone have an idea how I could not trigger the post-commit hook in these cases or any work around? Greg 回答1: When rebasing, there's a directory called rebase-merge present in the .git folder. That could be an approach to disable the hook during a rebase (the start of a rebase btw is indicated by the pre-rebase