post-commit

Can a script be automated after a commit on Perforce?

与世无争的帅哥 提交于 2020-01-02 09:56:27
问题 We use Perforce at work, and routinely keep software projects in the repository. In general creators follow the normal Perforce flow, BUT we also have a class of users, who doesn't have any need to edit the files but only read them. Currently we use P4Web but that requires the user so download each file individually to reassemble the project directory. Ideally I would like to have a process where when a user does a commit/submit in Perforce, the script would automatically run to generate a

how to get project path in hook script post-commit?(git)

给你一囗甜甜゛ 提交于 2020-01-02 01:22:04
问题 I want to call a Script that is located in the repository. I could of course do the following: #!/bin/sh ../../myscript.sh but I think thats not nice ;) so how do I get the path of my project within the post-commit script? 回答1: When you're dealing with a non-bare repository, the post-commit 1 hook is run with a current working directory of the working tree of the repository. So, you don't need the ../../ . If you want the full path of the script, you could always do: SCRIPT=$(readlink -nf

Delete and completely remove the commit from git history

你。 提交于 2020-01-01 16:39:28
问题 I have a commits in my git history 1.commit 4930da17d8dd23d650ed38435d8b421816a0c451 Date: Sat Dec 5 14:34:18 2015 +0530 2.commit e1ebbbb599ee20ebec3ca92c26266d9fd16e7ccc Date: Sat Dec 5 13:22:20 2015 +0530 3.commit 1c4a11a80eb054d24dafec2efed0b0282188e687 Date: Sat Dec 5 12:11:50 2015 +0530 4.commit b4ab3c164a3a8d93e0a71a94b5c561cb5e20ebf6 Date: Sat Dec 5 12:09:56 2015 +0530 5.commit 167b1d10258381f09663ce61fa88ce3bbcd404c4 Date: Sat Dec 5 12:09:21 2015 +0530 6.commit

Group revisions together with Trac?

穿精又带淫゛_ 提交于 2019-12-25 00:13:59
问题 How does one "group a bunch of revisions you've already committed to svn together" (see Jim T's answer) in Trac? 回答1: The very basic idea is simply to put a bug number into the revision log when you commit. If it's the first thing, then when you look down the logs you'll be able to see the bug numbers easily. I know Redmine has an additional feature that checks for these bug numbers in the commit logs and attaches the revision to the bug, so you can see from the bug all the revisions that

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

Post-commit hook that performs an action only if commit affects the specific path

╄→尐↘猪︶ㄣ 提交于 2019-12-24 17:53:17
问题 In some cases it's required to perform a post-commit operation only if some condition is met. E.g. to send an e-mail only when the committed revision affects '/tags' directory. I've searched the web for such script sample to run in Windows environment and wasn't able to find any so I had to write it myself. 回答1: The post-commit.bat code: REM The command checks whether the committed revision changes any data under '/tags' "%VISUALSVN_SERVER%bin\svnlook.exe" dirs-changed %1 --revision %2 |

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

(iOS, XCode 4.2) Setting bundle version using Git post-commit hook causes my project to turn into a Mac project

谁都会走 提交于 2019-12-22 10:00:13
问题 I've decided to start versioning my project "the Apple way," using "Bundle versions string, short" for the "marketing version" (i.e. 2.0.1 ) of my project, and "Bundle version" as a build number (e.g. 42 ). To that end I've added a Git post-commit hook to call agvtool next-version -all . This does in fact work -- Info.plist is being properly updated with an incrementing version number. However it also has the unfortunate side effect of apparently converting my iOS project into a Mac project -

post-commit hook produces error on svn commit but works when run on manually on command line

﹥>﹥吖頭↗ 提交于 2019-12-20 06:10:10
问题 I am currently trying to set up the post-commit hook for my subversion repository to send a email notifications. I am using subversion 1.7.8. My post-commit hook script is as follows: #!/bin/sh REPOS="$1" REV="$2" "$REPOS"/hooks/mailer.py commit $REPOS $REV "$REPOS"/mailer.conf When I make a commit the following error message is produced: Traceback (most recent call last): File "/lib/python2.7/site.py", line 563, in <module> main() File "/lib/python2.7/site.py", line 545, in main known_paths

Using SVN post-commit hook to update only files that have been committed

随声附和 提交于 2019-12-17 17:42:00
问题 I am using an SVN repository for my web development work. I have a development site set up which holds a checkout of the repository. I have set up an SVN post-commit hook so that whenever a commit is made to the repository the development site is updated: cd /home/www/dev_ssl /usr/bin/svn up This works fine but due to the size of the repository the updates take a long time (approx. 3 minutes) which is rather frustrating when making regular commits. What I'd like is to change the post-commit