0

I am working on a project regarding svn,is there any way to force svn comments or log messages only for cpp files....thank you in advance

2 Answers 2

2

Use a subversion pre-commit hook. Here are a few examples that require comments, it should be simple enough to modify them to work only when a cpp file is involved.

http://www.anujgakhar.com/2008/02/14/how-to-force-comments-on-svn-commit/ http://www.stillnetstudios.com/require-subversion-comments-minimum/

Sign up to request clarification or add additional context in comments.

2 Comments

I have tried using grep and find commands...still its ideal, forcing commands for all kind of files
could u tell the steps to modify it for cpp files
1

It is ideal to provide a commit message for any commit you are doing.

Anyway, you can setup a client side pre-commit hook using TortoiseSVN to see if the message is empty and if the file is a cpp file, you can block the commit.

If you want this to be done for everyone and can't ask everyone to setup client side hooks, you can setup a server side pre-commit hook to do the same. Note that TortoiseSVN client side commit hooks are very different from server side hooks.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.