Home » Community » Coffee corner » SVN hooks
SVN hooks [message #24636] |
Tue, 26 January 2010 07:45 |
|
Hello,
I just noticed, that the version(or revision if you want) string in uppsrc/ide/version.h is empty in svn. It is only filled later by the building scripts. Is there some reason why we don't use svn capabilities to keep there an up-to-date number? I'm sure this could be achieved quite simply using post-commit hook...
On related topic: It was discussed in the forum, that each commit should have a log message. While looking at the svn hooks possibilities, I discovered a script, that checks and refuses commits without log, returning error message to user.
Best regards,
Honza
|
|
|
|
Re: SVN hooks [message #24706 is a reply to message #24703] |
Thu, 28 January 2010 07:01 |
|
I did something similar once before... Don't remember it exactly, but I can sure dig out the info I'll let you know...
|
|
|
Re: SVN hooks [message #24707 is a reply to message #24636] |
Thu, 28 January 2010 08:47 |
|
Hi Mirek,
It looks that I was wrong about the versioning It seems that it is not possible to modify versioned files from hooks. I couldn't even find any workaround...
But at least the log checking script might be useful. Just copy the attached file into the hooks directory in svn repo and set it executable. It will check if log message includes any non-whitespace characters. If the check fails, error message is set to client. I did test if it works, but please make sure that it will work on your svn too. If there's any error, it would prevent anyone from committing.
Honza
-
Attachment: pre-commit
(Size: 0.48KB, Downloaded 333 times)
|
|
|
|
Goto Forum:
Current Time: Fri Nov 01 01:04:14 CET 2024
Total time taken to generate the page: 0.02622 seconds
|