-
Notifications
You must be signed in to change notification settings - Fork 917
Fix git file history log order #9128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6de5430 to
55dc033
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, git log and UI are in the same order
|
this is currently breaking the date column ordering of subversion repos. Will need another pass. |
55dc033 to
a92363b
Compare
|
that was just a rebase with no other changes. will add a fix for SVN/HG later. Is fairly trivial. |
To get a git log for a file, history entries can't be simply sorted by date. Common actions like rebase may change commit order, commits could also have the same commit date and still be valid etc. This change adds a position field to the fetched history entries which is now used in the UI comparator instead of dates. Comparisons between local and git history items still use timestamps. Update SVN/HG history provider to return file history without order randomization (trivial HashMap -> LinkedHashMap change).
javac fixes, dead code removal, language updates and other minor improvements.
a92363b to
08991c5
Compare
|
change was squashed into the first commit: diff: https://github.com/apache/netbeans/compare/a92363b67dbb43de5e3edb7bd78f101a5739cae5..08991c59f4f88c8ffeb70f5ed78a45408f04575c msg: Update SVN/HG history provider to return file history without order randomization (trivial |
|
all green, manually tested file history for a SVN and HG project and it worked thanks for the review! -> merging for NB 29 |
To get a git log for a file, history entries can't be simply sorted by date. Common actions like rebase may change commit order, commits could also have the same commit date and still be valid etc.
This change adds a position field to the fetched history entries which is now used in the UI comparator instead of dates.
Comparisons between local and git history items still use timestamps.
first commit has the modifications, second is for cleanup in related files.
reproducer:
INIT,BandAAandBshould not be in conflict so that commit order can be easily changed)BwithAgit logshould showINIT,A,B, the NB file history tab will showINIT,B,Awhich is not the correct log ordergit ->show historyaction does always show the correct order, this is about the history mutiview tabThis is a minimal attempt to resolve this issue. UI-wise we should probably do more and swap the revision and date columns (and probably don't allow to sort by date at all).
draft since i have to test this better and I might add a cleanup commit,feedback still welcome