Bug 438301 - Apply patch error message needs improvement
Summary: Apply patch error message needs improvement
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Git (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows 8
: P2 minor (vote)
Target Milestone: 10.0   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-06-26 12:31 EDT by Grant Gayed CLA
Modified: 2015-10-08 16:37 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2014-06-26 12:31:24 EDT
- on the Git Repository page press the Apply Patch button
- in the subsequent dialog just press OK without filling in any details
- error message is shown: "Apply patch failed. host parameter is null", which is not user-appropriate
  - the dialog probably should have noted that no patch details were entered when OK was pressed, and as a result not bother calling the thing that attempts to do the work
  - or perhaps the OK button should have been disabled
Comment 1 Grant Gayed CLA 2015-05-04 10:26:31 EDT
Still happens in the latest.
Comment 2 Steve Northover CLA 2015-07-03 10:08:17 EDT
Please fix if easy.
Comment 3 Carolyn MacLeod CLA 2015-07-07 15:54:00 EDT
I think you should disable the OK button.
Here is an example fix where that was done, fyi: bug 427040
Comment 4 Eric Moffatt CLA 2015-09-29 14:34:38 EDT
Grant, is the text for this message coming from the server (a la the comments on bug 427040) ?

I can likely copy Mark's fix of disabling the OK button (which is indeed better IMO) but if these messages are being presented to the user doesn't *someone* have to translate them ? 

Perhaps the server should be responding with a messages 'key' (we could even use the existing strings) and have the translation done on the client side prior to display ?
Comment 5 Eric Moffatt CLA 2015-10-05 15:09:03 EDT
Apparently the server translation issue is larger than just GIT so it'll be handled separately I think...

Taking a quick look at the behavior makes me think that even knowing when to enable the OK button may be a problem. GIT returns a variety of different messages depending on the format of the given URL:

file:/as.foo:       unsupported protocol 'file'
www.abc.com:        host parameter is null (i.e. same as we get with nothing)
file:\\temp\foo.js: invalid url 'file:\\temp\foo.js' incorrect path
http://w3.ibm.com:  no files changed
https://w3.ibm.com  Remote host closed connection during handshake

Given this I'm not sure whether we should be getting in the way of JGit's handling...
Comment 6 Steve Northover CLA 2015-10-05 15:24:51 EDT
Can we get the messages out first and then worry about the translation?  Not sure  if the translation is blocking the fix ...