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

RE: commit dialog behaviour on check-commit-hook

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 13 Sep 2016 10:20:23 -0700 (PDT)

> 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

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

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2016-09-13 19:20:26 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.