[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Suggestion: the characters that do not allow committing.

From: Serge Tumanyan <tumanyan_at_mail.ru>
Date: Sat, 4 Sep 2010 02:09:55 +0400

Hello, Jean-Marc.

> One more suggestion:
> when you work in a project with verystrict rules, sometimes there is a
> need
> to provide the different templates with the choices for adding,
> committing,
> importing and so on. There is a standard notation for such a list of
> choices
> looking like: [choice1|choice2|choice3] - that means that you should
> select
> only either choice1 or choice 2 or choice3, but never a couple of them
> simultaniously.
>
> One more need is the non-necessary choices like:
> 'the problem was fixed by adding the [scripts: script1][ and ][functions:
> function1]'. In other words if the scripts were added we add the first
> template for the scripts, if the functions were added we take the third
> template for the functions and if both were added we take the second
> template in addition to first and third.
>
> In all these cases we have symbols that should be removed when committing
> because they have special meaning on the template level and should never
> be
> committed. In the examples provided these symbols are: '[', ']' and '|'.
> In
> addition to this non-committing of such a message is a good reminder that
> the template should be modified before committing.
>
> I suggest to add the TSVN property like TSVN:ProhibitiedCharacters that
> will
> carry a list of characters and even may be substrings that stops the
> commit,
> not allowing to perform it while these characters are present.
Why don't you create your own 'commit message validation' script and
add it as a pre-commit hook? That is the proper way to handle this,
ensuring that ALL commits are checked, not just the ones done through
TSVN.

There are two problems here:
1. the hook script is called only for the commit, not for import or
branching for example, at least this is mentioned in the documentation.
2. There is no ability to prevent a commit/import/branching with an error
message and returning back to commit/import/branching dialogue or at least I
was unable to find this in the documentation.

Thank you.

Serge.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2655266

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-09-04 00:12:44 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.