Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339682 - [server] Provide REST API for generating diff between two commits
Summary: [server] Provide REST API for generating diff between two commits
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 339898 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-11 08:16 EST by Tomasz Zarna CLA
Modified: 2011-09-01 11:42 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 Tomasz Zarna CLA 2011-03-11 08:16:07 EST
First thought: could be implemented as GET /git/diff/{commit}..{commit}/file/{projectId}/[{filePath}]
Comment 1 Szymon Brandys CLA 2011-03-11 11:52:49 EST
We discussed it today. It looks like we need something like this:

POST /git/clone/[resourcePath] and a resource to compare should be passed in the body. The response should contain the location of the diff i.e. /git/diff/[diffLocation] and perhaps the diff result. Later when GET /git/diff/[diffLocation] is called we will get the result of the diff again.
Comment 2 Tomasz Zarna CLA 2011-03-15 09:30:15 EDT
Fixed with 61071497ae1aa5cde44e26f8e8db891fb81ccdd5.

POSTing to a DiffLoaction for a commit[1] with a body containing a pointer to a new revision[2] will return a diff location in Header of the response[3].

[1] e.g. /git/diff/HEAD/file/A/file.txt
[2] { "New" : "HEAD^1" }
[3] Location : {...}/git/diff/HEAD..HEAD^1/file/A/file.txt
Comment 3 Tomasz Zarna CLA 2011-03-30 11:55:31 EDT
*** Bug 339898 has been marked as a duplicate of this bug. ***