Community
Participate
Working Groups
If the Git repository is located on a different host the repository lookup fails when fetching patch sets: http://tasktop.com/blog/eclipse/stage-build-review-with-git-gerrit-hudson-and-mylyn#comment-137721 .
Sascha, to fix this could we use GerritConfig.gitDaemonUrl to search for the local Git repository instead of the URL of the Gerrit repository?
I'm not sure that use of gitDaemonUrl would help, but I'll have a look.
Fixed with http://git.eclipse.org/c/mylyn/org.eclipse.mylyn.reviews.git/commit/?id=e7c8e6adee6790ee9504056963b20822d8cc1620 Steffen, is this the correct way to access the GerritConfig instance: private String getGerritGitUrl() { GerritConfig config = GerritClient.configFromString(getTaskEditorPage().getTaskRepository().getProperty( GerritConnector.KEY_REPOSITORY_CONFIG)); return config.getGitDaemonUrl(); }
Thanks for working on this! I would suggest that we move ReviewSection.getConfig() up to AbstractGerritSection. The persistence mechanism should be internal to the connector.
Created attachment 201394 [details] mylyn/context/zip
Done in commit 1ea0f7ab3ec9fa4eff52c23d4a4de27b01f6a33b
I noticed that I get an NPE when trying to fetch a patch set from this review: http://review.mylyn.org/#change,5 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at java.net.URI$Parser.parse(URI.java:3003) at java.net.URI.<init>(URI.java:578) at org.eclipse.mylyn.internal.gerrit.ui.editor.PatchSetSection.getHostFromUrl(PatchSetSection.java:379) at org.eclipse.mylyn.internal.gerrit.ui.editor.PatchSetSection.doFetch(PatchSetSection.java:336) at org.eclipse.mylyn.internal.gerrit.ui.editor.PatchSetSection$2.widgetSelected(PatchSetSection.java:200) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) ...
Fixed with 3c9cc4f3b94481dd89a28a382ebc007e7e3a13a7
Could you please verify?
Looks good to me. Thanks!