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

RE: Client Hook to Server Hook communication

From: Simon Berry <Simon.Berry_at_andromeda.uk.com>
Date: Sun, 1 Feb 2009 23:46:29 +0000

Stefan

>> 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
>> message

>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.

I have run in to a bit of a catch-22 situation with tortoise's client side hooks. At first I was using the client pre-commit hook to check the validity of the files in the commit, as I thought that I could add the 'VERIFIED' tag to the log message without the user even seeing it. But it appears that even though the pre-commit hook passes a 'MESSAGEFILE' parameter, any modifications to the log file at this point do not get passed to the server (is it there only for read-only purposes ?).

So I then thought I would use the client start-commit hook. This does let me modify the log file - however it appears that the 'PATH' parameter at this point lists only the paths that the commit action was performed on, i.e. the parent folder and not the modified child files inside a folder. I need the list of modified files in my script to perform the validation against.

I guess I could use the start-commit hook and work out the modifications for myself, but this seems messy and wasteful (as Tortoise is going to repeat this again as soon as my script exits).

Am I missing something obvious ? This doesn't seem right to me.

Thanks
Simon

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-02-02 07:04:46 CET

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

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