Community
Participate
Working Groups
Currently, new branches can only be pushed to a remote called "origin". We're going to need REST API for git push to any remote. The UI is already there, see bug 347892.
Changes pushed to a remote branch http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/?h=bug353557 as http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?h=bug353557&id=1f2e84b4e3250a62c8544be4f8f5096bf4fee4ab Waiting for a green light from bug 353733 to release the changes to master.
The API you are returning is not sufficient for the client. All we get is a remote branch location, that may not exist yet, so doing GET on it can return 404. If a user wants to pick a remote branch he is committing to he should be provided with at least those information: 1. Remote details (Name, URI etc) 2. Remote branch name When we list remote tracking branches for a remote we get a response that looks like this: { "Children": [ { "BranchLocation": "/gitapi/branch/file/1/", "CloneLocation": "/gitapi/clone/file/1/", "CommitLocation": "/gitapi/commit/79ff9d3266a495d1a7affd2e7bb5e3c8ed4f184d/file/1/", "FullName": "refs/remotes/origin/test", "HeadLocation": "/gitapi/commit/HEAD/file/1/", "Id": "79ff9d3266a495d1a7affd2e7bb5e3c8ed4f184d", "IndexLocation": "/gitapi/index/file/1/", "Location": "/gitapi/remote/origin/test/file/1/", "Name": "origin/test", "Type": "RemoteTrackingBranch" }, { "BranchLocation": "/gitapi/branch/file/1/", "CloneLocation": "/gitapi/clone/file/1/", "CommitLocation": "/gitapi/commit/9beebef2ae1ff0d8f62af1e5f151bd2e60b25694/file/1/", "FullName": "refs/remotes/origin/gh-pages", "HeadLocation": "/gitapi/commit/HEAD/file/1/", "Id": "9beebef2ae1ff0d8f62af1e5f151bd2e60b25694", "IndexLocation": "/gitapi/index/file/1/", "Location": "/gitapi/remote/origin/gh-pages/file/1/", "Name": "origin/gh-pages", "Type": "RemoteTrackingBranch" }, { "BranchLocation": "/gitapi/branch/file/1/", "CloneLocation": "/gitapi/clone/file/1/", "CommitLocation": "/gitapi/commit/79ff9d3266a495d1a7affd2e7bb5e3c8ed4f184d/file/1/", "FullName": "refs/remotes/origin/master", "HeadLocation": "/gitapi/commit/HEAD/file/1/", "Id": "79ff9d3266a495d1a7affd2e7bb5e3c8ed4f184d", "IndexLocation": "/gitapi/index/file/1/", "Location": "/gitapi/remote/origin/master/file/1/", "Name": "origin/master", "Type": "RemoteTrackingBranch" } ], "Location": "/gitapi/remote/origin/file/1/", "Name": "origin", "Type": "Remote" } Maybe we could return a list of similar objects, but only limited to the branches that user may commit to?
I've updated http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/?h=bug353557, please check it out and give it a spin. Comments are welcome.
Created attachment 201083 [details] mylyn/context/zip
Fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=4587f17f7c9ad1a34cb2a04492000175cf620805.