Please reply to the list as well, and not only to me (usually by using
the Reply All button). Also, please don't top-post on this list (i.e.
put your reply below the text you're replying to, not above it). Now,
see below :).
2010/9/10 Vojįček Ale¹ <avojacek_at_fblgroup.cz>:
> Thank you for fast reply.
> So I have to create pre-commit hook which will Cheb this for me :-(
> And set up tsvn property which will help to clients which using TortoiseSVN clients.
Do you mean a pre-commit hook that will change the properties of the
file being committed on the fly? That's not possible from a pre-commit
hook (will corrupt the working copy of the user that's committing).
It's theoretically possible from a post-commit hook in an additional
commit, but that is highly discouraged. For one thing, you must be
extremely careful to avoid certain race conditions or infinite loops.
And apart from that, there's the unavoidable problem that the client's
working copy is immediately out-of-date after he commits (because of
the additional commit from the post-commit hook).
The usual approach is:
- Create a standard client-side config file with the correct
auto-props settings, put it on a network share and educate your
developers on where they can find it and where to put it.
- Set up a pre-commit hook that blocks commits that do not have the
correct properties, and returns an error message telling that they
need to install the standard config file, which they can find on ...
This question comes up regularly on this list, so you may want to
search the archives a bit for more info. (also, some people have
created and posted to this list some very useful/powerful pre-commit
hooks, which can be easily configured to define the properties that
are required for certain file extensions etc.)
Cheers,
--
Johan
Received on 2010-09-10 14:44:49 CEST