Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » SVN hooks
SVN hooks [message #24636] Tue, 26 January 2010 07:45 Go to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 #24703 is a reply to message #24636] Thu, 28 January 2010 00:23 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14105
Registered: November 2005
Ultimate Member
I guess this is a good idea. Certainly better than current status.

Can you eventually find out the info how to do that? Smile

Mirek

Re: SVN hooks [message #24706 is a reply to message #24703] Thu, 28 January 2010 07:01 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

I did something similar once before... Don't remember it exactly, but I can sure dig out the info Smile I'll let you know...
Re: SVN hooks [message #24707 is a reply to message #24636] Thu, 28 January 2010 08:47 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Mirek,
It looks that I was wrong about the versioning Sad 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)
Re: SVN hooks [message #24722 is a reply to message #24707] Thu, 28 January 2010 17:58 Go to previous message
mirek is currently offline  mirek
Messages: 14105
Registered: November 2005
Ultimate Member
Works perfectly, thank you!

Mirek
Previous Topic: Some rules and suggestions
Next Topic: How to destroy your community (lwn.net article)?
Goto Forum:
  


Current Time: Fri Nov 01 01:04:14 CET 2024

Total time taken to generate the page: 0.02622 seconds