HiWe have a group of developers who like to do branch-based reviews rather than per-commit reviews. I am wondering whether anyone can think of (or I have missed) a solution to a problem they are having in trying to make gerrit a little more like a "pull-request" system.Situation:
- Developers tend to work on their own (non-reviewed) individual scratch branches.
- Eventually they create a merge commit to a reviewed feature branch
- Gerrit is set to "Create a new change for every commit not in the target branch", so they get a whole run of commits they can then review. They rely on this behaviour.
- Assuming everything reviews it gets merged, but
- At some point they may then merge this reviewed feature branch to (say) master, and that then opens up a whole new set of 'already reviewed' reviews as a result.
- They don't want that
So questions are around:Is it possible to override the project level "Create a new change for every commit not in the target branch" setting during a given push - i.e. as a %magic to gerrit?
Alternatively is there a way anyone can think of getting around this problem? i.e. creating a raw change with the REST 'POST /changes/{change-id}/merge' with the existing branch head as the source by-pass and do what was wanted?Or maybe via a patchset-creasted hook event?
--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Wed, Jan 31, 2018 at 6:44 PM, Richard Christie <r.d.f.c...@gmail.com> wrote:HiWe have a group of developers who like to do branch-based reviews rather than per-commit reviews. I am wondering whether anyone can think of (or I have missed) a solution to a problem they are having in trying to make gerrit a little more like a "pull-request" system.Situation:
- Developers tend to work on their own (non-reviewed) individual scratch branches.
- Eventually they create a merge commit to a reviewed feature branch
- Gerrit is set to "Create a new change for every commit not in the target branch", so they get a whole run of commits they can then review. They rely on this behaviour.
- Assuming everything reviews it gets merged, but
- At some point they may then merge this reviewed feature branch to (say) master, and that then opens up a whole new set of 'already reviewed' reviews as a result.
- They don't want that
So questions are around:Is it possible to override the project level "Create a new change for every commit not in the target branch" setting during a given push - i.e. as a %magic to gerrit?The "Create a new change for every commit not in the target branch" internally does nothing else butsetting the %base option [1] smartly, to achieve the desired behaviour.Try using the %base option to achieve what you need :-)