Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359710 - [compare] More generic Diff JSON representation
Summary: [compare] More generic Diff JSON representation
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-03 10:06 EDT by Szymon Brandys CLA
Modified: 2011-10-03 11:09 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Brandys CLA 2011-10-03 10:06:31 EDT
I noticed that the compare framework looks for the Git key in Diff JSONs. Since the compare may be used with various diff providers, we should use more generic name for this particular key.
So far the diff representations expected by the compare looks like this: 

--QBsq4sftABAQAaNRbB60wA
Content-Type: application/json; charset=UTF-8

{"Git":
{"Base":"http://localhost:8080/gitapi/index/file/z/a.txt",
"DiffLocation":"http://localhost:8080/gitapi/diff/Default/file/z/a.txt",
"New":"http://localhost:8080/file/z/a.txt",
"Old":"http://localhost:8080/gitapi/index/file/z/a.txt"}
}

--QBsq4sftABAQAaNRbB60wA
Content-Type: plain/text

diff --git a/a.txt b/a.txt
index 8318c86..4c5893c 100644
--- a/a.txt
.
.
.

I would replace the 'Git' key with 'Diff' or just move Base, Old, New to top.
Comment 1 Tomasz Zarna CLA 2011-10-03 10:20:17 EDT
(In reply to comment #0)
> I would replace the 'Git' key with 'Diff' or just move Base, Old, New to top.

I'm up for the latter.
Comment 2 Tomasz Zarna CLA 2011-10-03 11:04:18 EDT
The representation changed to: { "Type": "Diff", "Location" : "...", "Base" : "...", "New" : "...", "Old" : "..." } with http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=617fd5ac2c037e1b023076bc4e414549da77bc65.
Comment 3 Szymon Brandys CLA 2011-10-03 11:09:08 EDT
Compare aligned to this change.