Merge Request Version
Description including problem, use cases, benefits, and/or goals
To be able to review different changesets, it should be possible to change the comparison in a merge request.
TODO
-
Backend changes to save every new merge request version - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5467 -
Allow user to switch between merge request versions - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5467 -
Allow user to compare between merge request versions - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6127 -
UI improvements https://gitlab.com/gitlab-org/gitlab-ce/issues/21427
Proposal
See latest proposal in comment https://gitlab.com/gitlab-org/gitlab-ce/issues/13570#note_12909009 and https://gitlab.com/gitlab-org/gitlab-ce/issues/13570#note_13002460 with example https://gitlab.com/gitlab-org/gitlab-ce/issues/13570#note_12909564. Feel free to contact @dzaporozhets during implementation for questions/details.
OLD Proposal
DZ explains it best in this comment.
We create a path that allows you compare the different commits in the merge request and a set of dropdowns to change this.
For example, merging the branch feature-1
into master
:
- master's commit
A
-
feature-1
has commits B and C, where C is the latest
Right now we only compare A...C.
We would introduce a path and dropdowns that allow you to change this to:
- A...B (see what has changed between master and the first commit on the source branch)
- B...C (see what has changed between the two commits on the source branch)
- A...C (original)
The dropdown would should the commit hash and a bit of the commit message, so you know what you're looking at.
Reviewboard does a nice thing, where they call A
the orig
, so that it's clear where the target is.
Links / references
Original issue
ZD: https://gitlab.zendesk.com/agent/tickets/15786
Description
Currently to get a Merge Request we use GET /projects/:id/merge_requests/:merge_request_id
. Is it possible to add the following syntax?
GET /projects/:id/merge_requests/:merge_request_id/:merge_version_id
Adding a merge version ID at the end while the head reference still points to the latest version without any changes.
The benefit would be that different versions of a MR can be compared very easily even if the MR is squashed / rebased etc which loses normally any signs of changes in between (compared to new commits all the time).
Reference
- Merge Request API: http://doc.gitlab.com/ce/api/merge_requests.html
What do you think @V@vsizov?