| Summary: | For Gerrit review workflow we need a way to push only a branch excluding tags | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Matthias Sohn <matthias.sohn> |
| Component: | Git | Assignee: | Maciej Bendkowski <maciej.bendkowski> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | maciej.bendkowski |
| Version: | 4.0 | ||
| Target Milestone: | 5.0 RC1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 425233 | ||
|
Description
Matthias Sohn
In my opinion, having both commands simultaneously isn't a good solution. Most users will not use any other push but the default 'push all'. We should be using two repository 'flavors' - a Gerrit one and a default one. Then, we might properly decorate git responses and use the 'visible' option to sort unnecessary git commands out. (In reply to Maciej Bendkowski from comment #1) > In my opinion, having both commands simultaneously isn't a good solution. > Most users will not use any other push but the default 'push all'. We should > be using two repository 'flavors' - a Gerrit one and a default one. Then, we > might properly decorate git responses and use the 'visible' option to sort > unnecessary git commands out. how would you then differentiate pushing a branch or a tag ? (In reply to Matthias Sohn from comment #2) > how would you then differentiate pushing a branch or a tag ? Ideally, we should have some kind of a context menu framework for commands, so you could easily change the subtype of any given command at invocation time. Consider a submenu for the 'Push' button, here you decide whether it should morph to 'Push All', 'Push tags', etc. Unfortunately, we do not have the time resources to have it for 5.0. For that reason, I suggest we have multiple command buttons, but show them only for Gerrit repositories. This way typical non-Gerrit users will still have only one command - 'Push All'. After 5.0 we should move towards the subcommand framework approach. What do you think, Matthias? asd (In reply to Maciej Bendkowski from comment #4) > asd Sorry, missclick. Assigning to myself. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=47988cc2e0430d60021c8cedb6ec1c04439ee860 As described before, I used the submenu command framework to push and fetch, so now it's possible to choose a particular subcommand from the dropdown menu. The next part would be to provide 'push tags' and 'push branch' commands both on the client and server side. (In reply to Maciej Bendkowski from comment #3) > (In reply to Matthias Sohn from comment #2) > > how would you then differentiate pushing a branch or a tag ? > > Ideally, we should have some kind of a context menu framework for commands, > so you could easily change the subtype of any given command at invocation > time. Consider a submenu for the 'Push' button, here you decide whether it > should morph to 'Push All', 'Push tags', etc. Unfortunately, we do not have > the time resources to have it for 5.0. For that reason, I suggest we have > multiple command buttons, but show them only for Gerrit repositories. This > way typical non-Gerrit users will still have only one command - 'Push All'. > After 5.0 we should move towards the subcommand framework approach. What do > you think, Matthias? sounds good, we can look for refspecs refs/for and the configuration option gerrit.createchangeid to detect if a repo uses gerrit, we could also add a config wizard to help configure that similar to egit (In reply to Matthias Sohn from comment #7) > sounds good, we can look for refspecs refs/for and the configuration option > gerrit.createchangeid to detect if a repo uses gerrit, we could also add a > config wizard to help configure that similar to egit With the new UI and submenus for commands, I think we can implement 'Push branch', 'Push tags' and incorporate them into the 'Push' command group. Distinguishing between regular repositories and Gerrit could be used to limit the visibility of certain push subtypes, e. g. push tags. Afterwards we might use custom user preferences to decide whether to show push subcommands for regular repositories. Fixed with: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=b93e0026b73e6edf3e0b81961eb2da1ef953b7c8 1. Added 'Push Branch' - pushes refs without the refs/tags 2. Added 'Force Push Branch' - same as above with the --force flag enabled (visible on the git-log page). On a related note: Although quite uncommon, one may want to push arbitrary refs/* to the remote, e. g. push only refs/tags without any commits. Or even combine that with the --force flag enabled. We have to figure out a clean way to manipulate command arguments and combine them, so 'Force Push' becomes just an parameter to the 'Push' command - not a different command. Since the initial problem was fixed, I'm closing this bug. For specific sub-issues, we should open separate bugs. |