I would like in the hook'е pre-commit to check whether the keyword = Revision property is set on the client making the versioned file commit and to prevent commit from an commit -configured client. Can someone know the svn server utilities that read client settings? Or is there any other way to monitor this situation? Help me please.

    1 answer 1

    I read the documentation . Looks like he doesn't know anything. Quote:

    It’s a client who knows what he knows about.

    (key highlighted by me).

    Can someone know the svn server utilities that read the client settings?

    agree, it was a bit strange.

    Or is there any other way to monitor this situation?

    Yes, and you called it yourself - pre-commit hook . Read to start two articles hook pre-commit to svn. Implementation on python. and Perl :: Critic + Subversion = implementation of common coding practices in the team .

    svn will transmit some information about the commit and the actual text of the commit itself. We'll have to write a script that will pull out the revision from the file that is committed and compare it with the desired one. Where to get the "desired"? If I remember svn correctly, then the revision changes to each commit. So you can compare it with the previous one, which you can save knowingly. But I'm not sure that I understand this correctly.

    • great thank you! - VVS
    • The meaning of the task was that the client could not put the text of the module without the disclosed key. Otherwise, a file with a “type of opened” key could get into the archive, which is actually just the text that the previous client actually opened, which commits this module. Those. it turned out that if commit was made from a folder without the keyword property, then taking modules from svn (for example, for release), I get fake versions of the files. - VVS
    • Manually, of course, everything can be controlled, but I wanted to automate it all. So the idea came to prohibit the client from doing commit commitments without keywords at the pre-commit stage. Now we have managed to get around this problem (the task has changed), but the interest has remained. There will be time - I will dig. - VVS