Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339109 - [server] Provide REST API for git remote
Summary: [server] Provide REST API for git remote
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: Szymon Brandys CLA
QA Contact:
URL: http://www.kernel.org/pub/software/sc...
Whiteboard: gsoc2011
Keywords:
Depends on: 347906
Blocks: 336116 344215
  Show dependency tree
 
Reported: 2011-03-07 11:05 EST by Tomasz Zarna CLA
Modified: 2012-01-19 10:58 EST (History)
2 users (show)

See Also:
Szymon.Brandys: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2011-03-07 11:05:59 EST
We're going to need REST API for git remote (tracking remote branches).
Comment 2 Piotr Janik CLA 2011-05-23 12:16:42 EDT
I've got a question about existing part of this REST API: GET /git/remote/{remote_name}/file/{project} 
Response contains some information about remote and ALL branches in the repository ('children' section). So, i.e. when I send request for remote "test", children section contains branch refs/remotes/origin/master. Is it correct behaviour or a bug?
Comment 3 Piotr Janik CLA 2011-05-23 17:29:19 EDT
Early version ready for review (remote add and remote rm).
Comment 4 Tomasz Zarna CLA 2011-05-24 04:00:19 EDT
(In reply to comment #2)
> [...] when I send request for remote "test",
> children section contains branch refs/remotes/origin/master. Is it correct
> behaviour or a bug?

This is expected. We give brief info about remote branches when asking about branch. The user can then fetch details about a branch by following BranchLocation.
Comment 5 Szymon Brandys CLA 2011-05-25 10:11:12 EDT
Piotrek I would rather use:

(1)
POST /git/remote/file/[path]/
{
Name: remoteName
URL: remoteURL
...
}

instead of:

(2)
PUT /git/remote/[remoteName]/file/[path]/

The reason is, we have (1) already when we try to create a new remote and we would have to craft (2) manually to send PUT for it.
Comment 6 Szymon Brandys CLA 2011-05-26 06:14:25 EDT
I released changes to the server code. We still need tests and our wiki with Git REST API updated. When these two things are done, we may close the bug.
Comment 7 Piotr Janik CLA 2011-05-31 12:25:03 EDT
Git REST API is updated.
Tests and fixes: https://github.com/pjanik/orion.server/tree/bug339109update1
[I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use]
Comment 8 Tomasz Zarna CLA 2011-06-01 07:04:06 EDT
Piotrek, please take a look at bug 347906.
Comment 9 Szymon Brandys CLA 2011-06-01 08:26:49 EDT
Tests added with 1652ad0af262a8b383222b9195666b363673663f.