Bug 161536 - Warn user when committing resources with problem markers
Summary: Warn user when committing resources with problem markers
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.3 M4   Edit
Assignee: platform-cvs-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, helpwanted
Depends on:
Blocks:
 
Reported: 2006-10-19 05:13 EDT by Brock Janiczak CLA
Modified: 2006-12-12 10:42 EST (History)
0 users

See Also:


Attachments
Patch to org.eclipse.team.cvs.ui (2.80 KB, patch)
2006-11-03 17:07 EST, Brock Janiczak CLA
no flags Details | Diff
Patch to org.eclipse.team.cvs.ui (3.86 KB, patch)
2006-11-03 18:40 EST, Brock Janiczak CLA
no flags Details | Diff
Patch to org.eclipse.team.cvs.ui (8.19 KB, patch)
2006-11-17 04:56 EST, Brock Janiczak CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brock Janiczak CLA 2006-10-19 05:13:42 EDT
Version: 3.3.0
Build id: I20060922-0010

There is currently no warning that the user is about to check in resources with errors or warnings.  It might be nice to either prompt the user before the commit wizard is opened, or display a prominent message in the wizard to indicate that some resources potentially have errors.  With luck, it will help prevent people from committing changes with warnings.

My idea was to have two new preferences:
"Commit resources with errors" and "Commit resources with warnings".  The valid options would be "yes", "no", "prompt".  The default value for both preferences would be "prompt".

This would work similar to the "Continue launch if project contains errors" preference in the launching plugin.
Comment 1 Bogdan Gheorghe CLA 2006-11-03 16:27:31 EST
This sounds like a good enhancement. Given the shortage of cycles here, we won't be able to address this but would be more than happy to accept any patches.
Comment 2 Brock Janiczak CLA 2006-11-03 16:44:40 EST
I have prototyped a basic version of this, but it needs to call getInfosToCommit to get a list of the real resources being committed.  This isn't cool because it means the list of outgoing changes will need to be calculated twice.  Once for this and once to populate the view showing the outgoing changes.
Comment 3 Brock Janiczak CLA 2006-11-03 17:07:58 EST
Created attachment 53235 [details]
Patch to org.eclipse.team.cvs.ui

I have attached a proof of concept.  It should just pop up a dialog informing you that there are outgoing changes with problems.  Let me know what you think.
Comment 4 Brock Janiczak CLA 2006-11-03 18:40:19 EST
Created attachment 53240 [details]
Patch to org.eclipse.team.cvs.ui

Updated patch that adds two new preferences and correctly prompts the user based on the errors/warnings in the resources being committed.
Comment 5 Michael Valenta CLA 2006-11-08 10:53:40 EST
Thanks for the patch.
Comment 6 Michael Valenta CLA 2006-11-16 15:08:06 EST
Brock, your second patch only includes the preference code and does not contain the prompting code that is present in the first patch.Is this intentional?
Comment 7 Brock Janiczak CLA 2006-11-16 17:36:35 EST
uh, no.  I probably forgot to include files there were not under CVS control.  I will recreate it tonight.
Comment 8 Brock Janiczak CLA 2006-11-17 04:56:55 EST
Created attachment 54059 [details]
Patch to org.eclipse.team.cvs.ui

Updated patch including changes to commit wizard and preference pages.  Still needs NLS doing, but should be feature complete.
Comment 9 Michael Valenta CLA 2006-11-27 10:47:09 EST
I have released the patch with the following modifications:

1) We don't prompt by default on warnings but the user can turn it on. We do prompt for errors.

2) The option to remember the decision is turned off (i.e. I think it is better for the user to explicitly indicate that they want to have what they choose remembered).

3) If the users chooses to disallow, we still prompt with the option to continue and I changed the Remember message to "Allow commits with errors/warnings".

If I had time, I would actually change the options to be the same as a debug launch (i.e. the options would be Allow or Prompt) but I think it is acceptable the way it is.
Comment 10 Michael Valenta CLA 2006-12-12 10:42:00 EST
Verified