Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 456084

Summary: Stale content in Git diff viewer
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: GitAssignee: Project Inbox <orion.git-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P2 CC: gheorghe, libingw
Version: unspecified   
Target Milestone: 8.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2014-12-23 10:04:03 EST
- Latest Orion as of Dec 23, 2014
- Internet Exploder only

Steps:

1) Start with a git repository with no changes
2) In editor page, change a line, let it auto-save
3) Go to git page, preview change in both side-by-side and inline view
4) Go back to editor, make a *different* change in the same file
5) Go back to git page and preview changes

-> The inline compare editor shows stale change from 2). The side-by-side editor shows the change from 4).

Marking major because it could cause a user to commit something unexpected.

Not reproducible on Chrome.
Comment 1 libing wang CLA 2015-01-05 13:34:24 EST
Looked at the network tab in hte debugger. The diff returned from the server is stale. Inline view displays a merged version of the text that depends on the diff. The side by side view shows the actual text by requesting the file contents and that is why it is correct.

Not sure why it only happens in IE. Need further investigations...
Comment 2 libing wang CLA 2015-01-05 16:03:36 EST
It turned out to be hte IE caching issue.

In bullet 9 here http://stackoverflow.com/questions/16971831/better-way-to-prevent-ie-cache-in-angularjs, it talks about how to prevent this from IE.

I gave it a quick try in gitPlugin.js and it seems working :

				headers: {
					"Orion-Version": "1",
					"Cache-Control": "no-cache, no-store, must-revalidate",
					"Pragma": "no-cache",
					"Expires": 0
				},
Comment 3 libing wang CLA 2015-01-06 15:29:10 EST
Turned out to be a fix on the server side.
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=75fb396f72a0946661a7c420330b19648b60d570
Comment 4 libing wang CLA 2015-01-06 15:32:30 EST
To verify the fix in IE, if you have previous testing files, you have to use IE's dev tool to clear browser cache once.