Bug 553256 - Push command via Find Actions not available if I'm in the Git staging view
Summary: Push command via Find Actions not available if I'm in the Git staging view
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-20 06:46 EST by Lars Vogel CLA
Modified: 2019-11-20 11:03 EST (History)
3 users (show)

See Also:


Attachments
Push (343.29 KB, image/png)
2019-11-20 06:46 EST, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2019-11-20 06:46:58 EST
Created attachment 280740 [details]
Push

Similar to Bug 553223, I see Push to Gerrit (which does not make sense, as the repo I'm working on is a pure Github repo) but not Push.
Comment 1 Thomas Wolf CLA 2019-11-20 08:27:26 EST
Push to Gerrit is a default handler. That it's visible in Quick Access is part of bug 495064. But if I fix this, I'll also remove the default handler for Fetch from Gerrit -- there we even added a repository selection dialog due to bug 507733 which you had opened. If the default handler is removed, "Fetch from Gerrit" and "Push to Gerrit" will be available only if the selection defines a Gerrit-enabled repository, so then we can even roll back https://git.eclipse.org/r/#/c/128357/.

Why "Push" is not showing up is unclear; possibly some strange behavior in the staging view. (No staged or unstaged changes, focus probably in the commit message editor.)
Comment 2 Lars Vogel CLA 2019-11-20 08:31:27 EST
The behavior of https://git.eclipse.org/r/#/c/128357/ is still really nice, e.g. if I "just work" in Eclipse for example using an example RCP app and think the change I'm testing is ready to be used, I can Ctrl+3 -> Push to Gerrit and select the repo I want to work with.
Comment 3 Thomas Wolf CLA 2019-11-20 08:35:49 EST
Well, you can't have both: either both are always active default handlers and thus show up in Ctrl-3 always and then Push to Gerrit should also get such a dialog, or both are active only if the selection defines a Gerrit context and then they will not show up when not appropriate, and the the dialog in Fetch from Gerrit is removed.
Comment 4 Lars Vogel CLA 2019-11-20 08:49:16 EST
(In reply to Thomas Wolf from comment #3)
> Well, you can't have both: either both are always active default handlers
> and thus show up in Ctrl-3 always and then Push to Gerrit should also get
> such a dialog, or both are active only if the selection defines a Gerrit
> context and then they will not show up when not appropriate, and the the
> dialog in Fetch from Gerrit is removed.

Maybe we should should have only one push command. And then depending on the Git repository it either pushes to Gerrit or to the Git repo. Command line also only has one push command.
Comment 5 Thomas Wolf CLA 2019-11-20 08:57:35 EST
(In reply to Lars Vogel from comment #4)
> Maybe we should should have only one push command. And then depending on the
> Git repository it either pushes to Gerrit or to the Git repo. Command line
> also only has one push command.

-1 for that. Some people want to push directly bypassing Gerrit.

I'd rather favor making these Gerrit handlers active only in a Gerrit context and removing the repo selection dialog. Plus, of course checking and possibly fixing that problem with the staging view.
Comment 6 Lars Vogel CLA 2019-11-20 09:26:04 EST
(In reply to Thomas Wolf from comment #5)
> (In reply to Lars Vogel from comment #4)
> > Maybe we should should have only one push command. And then depending on the
> > Git repository it either pushes to Gerrit or to the Git repo. Command line
> > also only has one push command.
> 
> -1 for that. Some people want to push directly bypassing Gerrit.
> 
> I'd rather favor making these Gerrit handlers active only in a Gerrit
> context and removing the repo selection dialog. Plus, of course checking and
> possibly fixing that problem with the staging view.

Of if nothing is selected, trigger a repo selection dialog and trigger the correct command (Gerrit push or normal push) afterwards.
Comment 7 Thomas Wolf CLA 2019-11-20 09:44:54 EST
(In reply to Lars Vogel from comment #6)
> Of if nothing is selected, trigger a repo selection dialog...

Which means some always active handler, which may show up when not appropriate in Ctrl-3. A unified "Push" is not possible, There _are_ huge difference between "Push...", "Push to upstream", "Push to Gerrit", and so on. "Push..." and "Push to upstream" could benefit from such a repo selection dialog, but "Push to Gerrit" (and likewise Fetch) would better only be active in a Gerrit context.
Comment 8 Matthias Sohn CLA 2019-11-20 10:06:36 EST
(In reply to Thomas Wolf from comment #7)
> (In reply to Lars Vogel from comment #6)
> > Of if nothing is selected, trigger a repo selection dialog...
> 
> Which means some always active handler, which may show up when not
> appropriate in Ctrl-3. A unified "Push" is not possible, There _are_ huge
> difference between "Push...", "Push to upstream", "Push to Gerrit", and so
> on. "Push..." and "Push to upstream" could benefit from such a repo
> selection dialog, but "Push to Gerrit" (and likewise Fetch) would better
> only be active in a Gerrit context.

+1
Comment 9 Thomas Wolf CLA 2019-11-20 11:03:44 EST
Push doesn't show up because there is simply no handler for it active on the view's selection, which is either some StagingEntries or, if there is no selection in the staged/unstaged viewers, a special selection containing the repository.

We would have to see which command handlers would make sense to also enable for the staging view's selection, and we'd have to be careful about it. (See bug 541752 for the reason.)