Permalink
Browse files

Browser needs special initialization from GitSCM class.

  • Loading branch information...
1 parent 97b321f commit 60c529f2d04b866e0443c9c922c78554d27d39c8 Mirko Friedenhagen committed Dec 1, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/main/java/hudson/plugins/git/GitSCM.java
@@ -11,6 +11,7 @@
import hudson.plugins.git.browser.GitWeb;
import hudson.plugins.git.browser.GithubWeb;
+import hudson.plugins.git.browser.RedmineWeb;
import hudson.plugins.git.opt.PreBuildMergeOptions;
import hudson.plugins.git.util.*;
@@ -1177,6 +1178,7 @@ private GitRepositoryBrowser getBrowserFromRequest(StaplerRequest req) {
final GitRepositoryBrowser gitBrowser;
final String gitWebUrl = req.getParameter("gitweb.url");
final String githubWebUrl = req.getParameter("githubweb.url");
+ final String redmineWebUrl = req.getParameter("redmineweb.url");
if (gitWebUrl != null && gitWebUrl.trim().length() > 0) {
try {
gitBrowser = new GitWeb(gitWebUrl.trim());
@@ -1193,6 +1195,14 @@ else if (githubWebUrl != null && githubWebUrl.trim().length() > 0) {
throw new GitException("Error creating GithubWeb", e);
}
}
+ else if (redmineWebUrl != null && redmineWebUrl.trim().length() > 0) {
+ try {
+ gitBrowser = new RedmineWeb(redmineWebUrl.trim());
+ }
+ catch (MalformedURLException e) {
+ throw new GitException("Error creating GithubWeb", e);
+ }
+ }
else {
gitBrowser = null;
}

0 comments on commit 60c529f

Please sign in to comment.