Skip to content

Support unified diff for version history entries - #2935

Open
tobiasmelcher wants to merge 1 commit into
eclipse-platform:masterfrom
tobiasmelcher:unified-diff-version-history
Open

tobiasmelcher wants to merge 1 commit into
eclipse-platform:masterfrom
tobiasmelcher:unified-diff-version-history

Conversation

@tobiasmelcher

Copy link
Copy Markdown
Contributor

Comparing two entries in the Eclipse History view currently falls back to the classic side-by-side compare editor, even when unified diff is enabled. Both historical revisions are represented by storage-backed editor inputs, which were not eligible for unified diff.

This change recognizes a pair of revision storage inputs and opens the right-hand revision in a read-only editor with the left-hand revision overlaid as the diff. This brings revision-to-revision comparisons into the unified diff workflow while preserving historical content as non-editable.

@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   58m 22s ⏱️ +53s
 4 810 tests ±0   4 788 ✅ ±0   22 💤 ±0  0 ❌ ±0 
12 321 runs  ±0  12 168 ✅ ±0  153 💤 ±0  0 ❌ ±0 

Results for commit 59cecf0. ± Comparison against base commit 984e8ec.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
org.eclipse.compare.tests.UnifiedDiffOpenTest ‑ testClassicEditorOpensForTwoRevisions
org.eclipse.compare.tests.UnifiedDiffOpenTest ‑ testUnifiedEditorOpensForTwoRevisions

♻️ This comment has been updated with latest results.

@vogella

vogella commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

There is a comment in CompareUIPlugin.java:928: "an editor opened on anything else, a revision for example, comes up empty." With this change that is not true anymore and the comment should be updated.

Also the scope seem wider than "version history entries", as the commit message indicates. I think it will also work for index-vs-HEAD comparisons (I did not test this).

@vogella

vogella commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Otherwise a great change! Thanks @tobiasmelcher

@tobiasmelcher
tobiasmelcher force-pushed the unified-diff-version-history branch from 5fd575c to 59cecf0 Compare September 21, 2026 07:24
@tobiasmelcher

Copy link
Copy Markdown
Contributor Author

Thanks Lars, good catch - I have updated the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants