Community
Participate
Working Groups
1. Go to the git repository page 2. Press Ctrl+Shift+H 3. A notification appears saying "No commits found" It is supposed to prompt for the SHA-1 of a commit or something.
As far as I can tell, the problem is caused by missing parameter collection in case of a key-binded command, which is never rendered. The command relies on the given commit name parameter, which is in our case 'undefined'.
pushed http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=113a133
ha ha, oops -- wrong bug. Ignore comment 2
As per Maciek's comment, the problem is something in the command framework. Right now the command is added this way: commandRegistry.registerCommandContribution("repoPageActions", "eclipse.orion.git.openCommitCommand", 1000, null, true, new KeyBinding.KeyBinding('h', true, true)) and keyBindingOnly is true. When we change keyBindingOnly to false, the param collector works again. Talked to Mark and he said to assign bug to him.
This has been broken since early in 3.0 -- I bisect'ed it to this commit: > 477cf3c06a42cd86fb12904fbc2cbd58032b524b is the first bad commit > commit 477cf3c06a42cd86fb12904fbc2cbd58032b524b > Author: sfranklin <susan_franklin@us.ibm.com> > Date: Mon Mar 11 14:21:57 2013 -0400 > > Bug 390356 - command service is not a service at all. Work in progress. Needs merging. This commit separated the command "registry" (commandRegistry.js) from the core commands (commands.js). It created a different code path for commands triggered by a keybinding: the command's callback is invoked directly from commands.js _processKey(), which does not gather any parameters. For commands that get rendered by the commandRegistry (i.e. commands with keyBindingOnly == false), the rendering process wraps their callbacks inside a function that calls _invoke() first to gather parameters. That's why only commands with keyBindingOnly == true have this bug, since they are never rendered as menus or buttons in the UI.
Patch is below. It changes _processKey() to execute commands using commandRegistry._invoke() if possible. This allows Open Commit's parameters to be gathered, which fixes the problem. Also commandRegistry.showKeyBindings() contains a copy of _processKey() that lets you invoke commands from the Show Keys menu. I had to make a similar change there, or else you'd run into the same problem when triggering Open Commit from Show Keys. Patch http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=afa85b2
Since Open Commit seems to be the only command broken in this way, and changing the commandRegistry/commands is riskier, decided to go with a safer patch http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=31f9e0f ^ In this one, Open Commit simply invokes itself through the command registry if it is missing its parameters. I will open a new bug for the general problem.
(In reply to comment #7) > Since Open Commit seems to be the only command broken in this way, and > changing the commandRegistry/commands is riskier, decided to go with a safer > patch > > http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/ > ?id=31f9e0f > > ^ In this one, Open Commit simply invokes itself through the command > registry if it is missing its parameters. I will open a new bug for the > general problem. +1 for this fix.
Verified fix
pushed to master http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=05e1be6
(In reply to comment #10) > pushed to master > http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/ > ?id=05e1be6 link should be http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=57f9c6b
(In reply to comment #7) > ^ In this one, Open Commit simply invokes itself through the command > registry if it is missing its parameters. I will open a new bug for the > general problem. Could you link the general bug to this one, please?
(In reply to comment #12) > Could you link the general bug to this one, please? Found it.