Login | Register
My pages Projects Community openCollabNet

Discussions > dev > RE: commit dialog behaviour on check-commit-hook

Project highlights: :. Download .: :. Support .: :. FAQ .: :. Translations .: :. Donate .: :. Report Bug .:

tortoisesvn
Discussion topic

Back to topic list

RE: commit dialog behaviour on check-commit-hook

Author steveking
Full name Stefan Küng
Date 2016-09-13 10:20:23 PDT
Message > I down't no what was wrong with my question that I got no answer to my first posting. :-( So I'll try again.
>

Seems your email address is considered spam by many providers (including outlook.com and gmail). So your posts all go to the spam folder and are ignored by most people.
I also almost missed your post because of that.

> As I read the documentation, the purpose of Check-commit hook ist to check the files selected in commit dialog after the user presses OK. And if the hook script detects some problems, it should return an error and a list of affected files. So the user can decide if he really wants to do the commit.
>
> The current behaviour in case of an error returned by the hook script is a dialog with the choice between two actions:
> 1 Abort: You can fix the reason the hook script failed first.
> 2 Proceed anyway: Ignore the hook script and run the command anyway.
>
> Choosing one of these options the behaviour of commit dialog is clear and it works like expected. But what should happen if the user cancels the dialog by pressing Escape-key or simply closing the dialog without making a choice? Action 1, action 2 or even do nothing? The current source code says: "If the choice is 1 then do some selection due to the error message and keep commit dialog open, do the commit otherwise." The latter is not what I'd expect on cancelling the dialog box containing the error message. But this is what happens. I would prefer proceeding would only take place if the user choice is: "Proceed anyway".
>
> In other words:
> /trunk/src/TortoiseP​​roc/CommitDlg.cpp Rev. 27110 Line 537
>
> I would replace:
> bool doIt = (taskdlg.DoModal(GetSafeHwnd()) == 1);
> by:
> bool doIt = (taskdlg.DoModal(GetSafeHwnd()) != 2);
> where doIt stands for "Abort".
>
> I may be wrong or the topic may be completely irrelevant, but please, give me an answer.

Done in r27441.

Stefan

« Previous message in topic | 2 of 3 | Next message in topic »

Messages

Show all messages in topic

commit dialog behaviour on check-commit-hook willorix Jens Wilhelm 2016-09-12 02:13:28 PDT
     RE: commit dialog behaviour on check-commit-hook steveking Stefan Küng 2016-09-13 10:20:23 PDT
         RE: commit dialog behaviour on check-commit-hook willorix Jens Wilhelm 2016-09-14 00:52:45 PDT
Messages per page: