DESCRIPTION

Fixed bug 359961: The History view date format is hard-coded 

Change-Id: I10d08b503313f146969f38d5207fd1bdfaf97b92


COMMENTS

author: Brenden Conley
date: 2011-10-28 09:37:33.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/1838/ 

-------------------------------------
author: Brenden Conley
date: 2011-10-28 09:50:45.000000000

Patch Set 1: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1838/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2011-10-28 21:10:01.000000000

Patch Set 1: I would prefer that you didn't submit this

(2 inline comments)



Line:36, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GraphLabelProvider.java -> I tried this on Mac OS X 10.6.8 with Language set to English but German date format. It seems the German date format set in Mac System Preferences isn't respected in Eclipse, I always get short EN_us date format in the History View when this change is used.

Line:7, /COMMIT_MSG -> style nits: 
- trailing whitespace 
- we don't want the bug number in the commit message header but in a footer immediately preceding the Change-Id footer in the last paragraph of the commit message as specified in [1].

[1] http://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines

-------------------------------------
author: Juliet Cantu
date: 2011-10-29 07:52:50.000000000

Patch Set 1:

Consider http://egit.eclipse.org/r/#change,4439 instead

It also does locale dependent formatting, but slightly differently.

-------------------------------------
author: Sebastian Porter
date: 2011-10-29 11:00:38.000000000

Patch Set 1:

> I tried this on Mac OS X 10.6.8 with Language set to 
> English but German date format. It seems the German date
> format set in Mac System Preferences isn't respected in 
> Eclipse,

Matthias, if you are using JRE 7 plus 3.7.x or 4.1.x then you see a known bug present on all Platforms. How is date & time rendered in other parts of the Eclipse UI, e.g. file properties page or CVS History view? I would assume it is wrong there too.

Do I have to resubmit just because the comment is wrong? Why do you care about the commit format at all (besides having the change-Id in it?

-------------------------------------
author: Sebastian Porter
date: 2011-10-29 11:35:20.000000000

Patch Set 1:

And something else to consider: if you use -nl or other command line options to change the language then this will override the Platform settings.

-------------------------------------
author: Sebastian Porter
date: 2011-10-29 11:40:06.000000000

Patch Set 1:

Robin, individual components should not provide their own date/time formatting. Otherwise the user has to change it at many places (Platform, JDT, Git, CVS, ...). See also https://bugs.eclipse.org/356052.

-------------------------------------
author: Juliet Cantu
date: 2011-10-29 18:01:17.000000000

Patch Set 1:

We do want the git feeling and thar includes seconds and timezone, so unless there actually is an setting that provides that, fine. I think the other places are wrong.

-------------------------------------
author: Juliet Cantu
date: 2011-10-29 21:56:53.000000000

Patch Set 1: (1 inline comment)



Line:36, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GraphLabelProvider.java -> I think it sort respect the settings, but it depends on the variant you request. getDateTimeInstance() is better.

-------------------------------------
author: Douglas Trujillo
date: 2011-10-29 22:19:21.000000000

Patch Set 1: (1 inline comment)



Line:36, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GraphLabelProvider.java -> I tried to use getDateTimeInstance() instead, but I still get US date formatting and 12 hour time with AM/PM instead of 24 hour time format which I defined in system preference

-------------------------------------
author: Douglas Trujillo
date: 2011-10-29 22:33:51.000000000

Patch Set 1:

I think I prefer Robin's proposal in change Ifb31dc38ea673b096869437b03e3c738fa89a07c to use JGit's git timestamp formatter which supports all the standard git timestamp formats so that we can later let the user choose his preferred format

-------------------------------------
author: Sebastian Porter
date: 2011-10-31 11:18:06.000000000

Patch Set 1:

> I think I prefer Robin's proposal in change
> Ifb31dc38ea673b096869437b03e3c738fa89a07c to use JGit's git 
> timestamp formatter which supports all the standard git 
> timestamp formats so that we can later let the user choose > his preferred format

I still find it a bad idea that specific plug-ins introduce their own formatting perference. It results in a product which looks like patch work. Also, as an EGit user I would expect to see the date in the (EGit) History view rendered the same as when I e.g. open the commit viewer. There I see a perfectly nicely formatted German date as expected:
"Sebastian Porter <dmegert> on 27.10.11 12:50" and I would simply expect to see the same in the History view.

If we think that the special Git format is important, then a preference should be added that allows to toggle between normal user readable format and the Git format. If the user chooses the Git format, then all UI in EGit should use it, i.e. also in the Commit editor.

Also note that there is currently a preference to set the date format for the change set date formatting (bug 356052).

-------------------------------------
author: Juliet Cantu
date: 2011-10-31 21:35:12.000000000

Patch Set 1: (1 inline comment)

The GitDateFormatter isn't necessary to get the format I think is the correct localized variant. getDateTimeInstance instead of getDateInstance solves the problem. To get the other Git formats we'd need another setting, so I could go with a modified version of your patch, and then we patch all other occurrences in EGit to use getDateTimeInstance too, until we change our mind....

Line:36, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GraphLabelProvider.java -> Seems java doesn't support en_DE either, stupid thing...

-------------------------------------
author: Douglas Trujillo
date: 2011-10-31 21:48:49.000000000

Patch Set 1:

ok, I agree to what Dani said and what Robin proposed

-------------------------------------
