Simon Berry wrote:
> I want to achieve the following :
> 1. User starts a commit 2. Client side hook checks files being
> committed for validity, rejects if not ok 3. Client side hook 'signs'
> the commit (via log message ?) to verify that data is correct 4.
> Server side hook checks incoming commit for 'signature' 5. Server
> side hook either accepts commit or rejects it with appropriate
> The reason for the signature is twofold - it verifies that the data
> is in the correct format - it prevents clients without hooks from
> committing at all (and therefore prevents committing of un-validated
> My questions are: a) Is the log message a good place to put the
Currently, that's the only place to put it.
> b) I could make the signature a simple string, e.g. 'VERIFIED', but
> then I would want to strip this out in the server side hook so that
> user wouldn't cotton on to the fact that they could append 'VERIFIED'
> to their log message and bypass the system. However, the server side
> 'start-commit' hook does not appear to receive any parameters
> relating to the log text. There is also a warning in the
> documentation about modifying any of the committed data. Because in
> our case the files being committed are large (20MB+), I would prefer
> to use the 'start-commit' hook rather than the pre-commit hook ...
> the users would get pretty upset if they spent an hour uploading data
> only to be told that the commit failed...
I think in your case, you *could* just use a simple string. If users add
that string themselves without checking first, then they will very soon
learn to really run the check first. If your files really are that big,
it will annoy those users so much when their commit fails that they
gladly run the check next time :)
> c) I also thought that I
> could do a hash/MD5 of the data being committed to 'sign' the commit.
> Maybe svn/tortoisesvn does this already? If so, can it be accessed?
No, that information is not accessible. But you couldn't use it anyway
because it's a hash for the *diff* that's sent to the server, not the files.
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-01-28 16:17:31 CET