Cherry pick from gerrit UI like a git cherry-pick -x

546 views
Skip to first unread message

William

unread,
Feb 28, 2023, 10:21:31 AM2/28/23
to Repo and Gerrit Discussion
Hi

Cherrypicking from the gerrit UI doesn't do a -x , cherrypicking from the gerrit UI adds the "cherrypicked from ...." message, is there a possibility of enabling the -x option?

Thanks
Gopi

William

unread,
Feb 28, 2023, 10:27:38 AM2/28/23
to Repo and Gerrit Discussion
"cherry picked from commit <commit ID>" is the text that -x adds to be specific , am looking to replicate this style of cherry-picking from gerrit UI

pon...@gmail.com

unread,
Mar 1, 2023, 3:19:35 AM3/1/23
to Repo and Gerrit Discussion
Hi Gopi,
I think you could use the project-download-commands plugin [1] to override the default commands in the download window.

HTH,
Ponch

William

unread,
Mar 6, 2023, 7:56:15 PM3/6/23
to Repo and Gerrit Discussion
On Wednesday, March 1, 2023 at 12:19:35 AM UTC-8 pon...@gmail.com wrote:
Hi Gopi,
I think you could use the project-download-commands plugin [1] to override the default commands in the download window.

HTH,
Ponch

Thanks Ponch for this, whats the expectation when this plugin is used? does the  download commands in the gerrit UI also change to what we have under the  plugin "project-download-commands"?

my end goal is when developers cherrypick from the gerrit UI, gerrit should use the commands mentioned in plugin "project-download-commands"

William

unread,
Mar 7, 2023, 4:27:06 PM3/7/23
to Repo and Gerrit Discussion
can anyone help to build tje plugin thats compatible with gerrit 3.7.1?FWIW I just cloned the gerrit repository and tried to build stable-3.7, and it doesn’t build.
Message has been deleted

William

unread,
Mar 7, 2023, 6:11:51 PM3/7/23
to Repo and Gerrit Discussion
I tried to compile the plugin with 3.7.1 and running into error below, It looks like the plugin config APIs have been significantly redesigned and the last update on this plugin is almost 3 years old, anyone who has experience in some of the more recently maintained plugins can help here?

 % bazel build release
INFO: Invocation ID: bce9cf50-d95a-410e-ae9d-28d4f89bb395
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=229
INFO: Reading rc options for 'build' from /Users/username/gerrit_configs/project-download-commands-plugin/gerrit/.bazelrc:
  'build' options: --workspace_status_command=python3 ./tools/workspace_status.py --repository_cache=~/.gerritcodereview/bazel-cache/repository --action_env=PATH --disk_cache=~/.gerritcodereview/bazel-cache/cas --java_language_version=11 --java_runtime_version=remotejdk_11 --tool_java_language_version=11 --tool_java_runtime_version=remotejdk_11 --incompatible_strict_action_env --announce_rc
INFO: Analyzed target //:release (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/username/gerrit_configs/project-download-commands-plugin/gerrit/plugins/project-download-commands/BUILD:3:14: Building plugins/project-download-commands/libproject-download-commands__plugin-class.jar (3 source files) and running annotation processors (AutoAnnotationProcessor, AutoValueProcessor, AutoOneOfProcessor, AutoValueGsonAdapterFactoryProcessor) failed: (Exit 1): java failed: error executing command external/remotejdk11_macos_aarch64/bin/java -XX:-CompactStrings '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' ... (remaining 17 arguments skipped)
plugins/project-download-commands/src/main/java/com/googlesource/gerrit/plugins/download/command/project/DownloadCommandUpdater.java:85: error: cannot find symbol
                PluginConfig cfg = projectState.get().getConfig().getPluginConfig(pluginName);
                                                                 ^
  symbol:   method getPluginConfig(String)
  location: class CachedProjectConfig
Target //:release failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2.615s, Critical Path: 2.26s
INFO: 21 processes: 6 internal, 11 darwin-sandbox, 4 worker.
FAILED: Build did NOT complete successfully

William

unread,
Mar 8, 2023, 10:42:15 AM3/8/23
to Repo and Gerrit Discussion
@Luca Milanesio @David Ostrovsky @Edwin Kempin - you seem to have worked on this plugin in the past , can you please assist here?

William

unread,
Mar 14, 2023, 12:31:16 PM3/14/23
to Repo and Gerrit Discussion
Folks, I really need some guidance here? appreciate any response here

Matthias Sohn

unread,
Mar 14, 2023, 3:49:09 PM3/14/23
to William, Repo and Gerrit Discussion
On Tue, Mar 14, 2023 at 5:31 PM William <bacha....@gmail.com> wrote:
Folks, I really need some guidance here? appreciate any response here

Please avoid top posting on this list, use interleaved posting instead.

That's documented in the plugin development guide

You can inject PluginConfigFactory then 
-Matthias 

If you want a separate plugin config file
--
--
To unsubscribe, email repo-discuss...@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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/5e041230-3560-4a4f-bd28-2395dfd62f89n%40googlegroups.com.

William

unread,
Mar 16, 2023, 5:30:13 PM3/16/23
to Repo and Gerrit Discussion
On Tuesday, March 14, 2023 at 12:49:09 PM UTC-7 Matthias Sohn wrote:
On Tue, Mar 14, 2023 at 5:31 PM William <bacha....@gmail.com> wrote:
Folks, I really need some guidance here? appreciate any response here

Please avoid top posting on this list, use interleaved posting instead.

That's documented in the plugin development guide

You can inject PluginConfigFactory then 
-Matthias 
Matthias - I am not sure I understand here, gerrit.config is for runtime and not build time, how are the links you shared going to solve this build error? can you please ELI5? 
Reply all
Reply to author
Forward
0 new messages