| Issue 2604: | REST API to check that a given revision exists in a project | |
| 1 person starred this issue and may be notified of changes. | Back to list |
The REST API allows to create a branch with:
PUT /projects/MyProject/branches/stable HTTP/1.0
Content-Type: application/json;charset=UTF-8
{
"revision": "76016386a0d8ecc7b6be212424978bb45959d668"
}
Before calling this API, I want to be able to verify that the revision being passed is valid. Something like:
GET /projects/MyProject/revisions/76016386a0d8ecc7b6be212424978bb45959d668
Note that the revision does not necessarily point to a commit that belongs to a Gerrit change. It could be a commit that has been directly pushed to the repository.
Apr 14, 2014
#1
dborowitz@google.com
Apr 14, 2014
> What is the current behavior of that PUT request? It returns an error, as expected. But in this particular use case, issuing the PUT request is not desired as that will actually create the branch when the revision is valid. Branch creations are going to be queued up in an external tool. We want to be able to do some kind of pre-validation before executing them. That includes checking that the given branch point is valid.
Jul 10, 2014
(No comment was entered for this change.)
Status:
Submitted
Labels: FixedIn-2.10
Jan 27, 2015
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |