Merge Request Splitting tool
Description
Integrate a merge request splitting tool that can help split a MR into multiple pieces to review bit by bit.
Why
A MR has too much code(monolithic/mega MR) and is hard to review in one sitting. Splitting a mega MR up manually can get confusing and is hard to get right.
Here is a small example of splitting up a MR:
- Review
MR: Add glEmojiTag
first because it doesn't rely on other things. Merge into overarchingMR: Update Emojis
- Because
MR: Update autocomplete
needs the changes fromMR: Add glEmojiTag
, we need a branch/MR to base it off of which is what I am calling a "chunk" MR. These chunks aren't reviewed and only exist so the diff is clean and we have something to merge into the overarching MR. - Review
MR: Update autocomplete
and merge into the chunk - Merge the chunk MR into the overarching MR
- Merge the overarching MR into
master
If you are looking for a bigger example, here is a tree based off of this MR, https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9437
- http://i.imgur.com/44CfjCJ.png
- https://drive.google.com/file/d/0B4cjIdQwaPXhZzRUd05GWGNTbG8/view?usp=sharing
Proposal
A node editor to setup the various MRs necessary to split up the code. Doesn't need to be drag and drop, just define dependencies(default to end node, otherwise some chunk node) for each node and auto-layout graph.
Take selections from the mega MR diff view and assign to a MR node.
In order to get clean diffs for code that relies on other pieces, "chunk" MRs are needed which are comprised of other nodes.
When all dependent MRs are merged into a chunk, automatically merge chunks according to the flow.
Although I have been talking about creating new separate MRs while explaining things, I think it would be better to have this integrated into the single mega MR and to think about it more like a new way to structure the diff.