Search code examples
windowssvnvisualsvn-serverpost-commit-hook

Don't execute SVN "post commit hook" when a specific file is committed


Is there any way to not to run "post commit hook" or skip "post commit hook statement" when a specific file is committed?


Solution

  • You can use a test in your post-commit script. The svnlook changed repository_directory will show which files changed - can use grep or similar.

    For example:

    #!/bin/sh
    
    /usr/bin/svnlook changed /svn/repo | grep -w ' yourfile$' && exit 0
    
    # here begin the main part of your (original) hook