Skip to content

Commit

Permalink
[FIXED JENKINS-20186] Incompatibility with Jenkins 1.536+.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Oct 22, 2013
1 parent 5ca710d commit 651ce33
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 47 deletions.
6 changes: 0 additions & 6 deletions src/main/java/hudson/plugins/mercurial/browser/BitBucket.java
Expand Up @@ -8,11 +8,9 @@
import java.net.MalformedURLException;
import java.net.URL;

import net.sf.json.JSONObject;

import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;

/**
* Mercurial web interface served using a <a href="http://bitbucket.org/">BitBucket</a> repository.
Expand Down Expand Up @@ -66,10 +64,6 @@ public String getDisplayName() {
return "bitbucket";
}

public @Override BitBucket newInstance(StaplerRequest req, JSONObject json) throws FormException {
return req.bindParameters(BitBucket.class,"bitbucket.");
}

@Override public FormValidation doCheckUrl(@QueryParameter String url) {
return _doCheckUrl(url);
}
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/hudson/plugins/mercurial/browser/FishEye.java
Expand Up @@ -8,11 +8,9 @@
import java.net.MalformedURLException;
import java.net.URL;

import net.sf.json.JSONObject;

import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;

/**
* Mercurial web interface served using FishEye.
Expand Down Expand Up @@ -76,10 +74,6 @@ public String getDisplayName() {
return "fisheye";
}

public @Override FishEye newInstance(StaplerRequest req, JSONObject json) throws FormException {
return req.bindParameters(FishEye.class,"fisheye.");
}

@Override public FormValidation doCheckUrl(@QueryParameter String url) {
return _doCheckUrl(url);
}
Expand Down
Expand Up @@ -10,11 +10,9 @@
import java.net.URL;
import java.net.URLEncoder;

import net.sf.json.JSONObject;

import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;

/**
* Mercurial web interface served using a <a href="http://code.google.com/">Google code</a> repository.
Expand Down Expand Up @@ -77,10 +75,6 @@ public String getDisplayName() {
return "googlecode";
}

public @Override GoogleCode newInstance(StaplerRequest req, JSONObject json) throws FormException {
return req.bindParameters(GoogleCode.class,"googlecode.");
}

@Override public FormValidation doCheckUrl(@QueryParameter String url) {
return _doCheckUrl(url);
}
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/hudson/plugins/mercurial/browser/HgWeb.java
Expand Up @@ -8,11 +8,9 @@
import java.net.MalformedURLException;
import java.net.URL;

import net.sf.json.JSONObject;

import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;

/**
* Mercurial web interface served using the standalone server
Expand Down Expand Up @@ -68,10 +66,6 @@ public String getDisplayName() {
return "hgweb";
}

public @Override HgWeb newInstance(StaplerRequest req, JSONObject json) throws FormException {
return req.bindParameters(HgWeb.class,"hgweb.");
}

@Override public FormValidation doCheckUrl(@QueryParameter String url) {
return _doCheckUrl(url);
}
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/hudson/plugins/mercurial/browser/KilnHG.java
Expand Up @@ -8,11 +8,9 @@
import java.net.MalformedURLException;
import java.net.URL;

import net.sf.json.JSONObject;

import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;

/**
* Mercurial web interface served using a <a href="http://kiln.org/">Kiln</a> repository.
Expand Down Expand Up @@ -68,10 +66,6 @@ public String getDisplayName() {
return "kilnhg";
}

public @Override KilnHG newInstance(StaplerRequest req, JSONObject json) throws FormException {
return req.bindParameters(KilnHG.class,"kilnhg.");
}

@Override public FormValidation doCheckUrl(@QueryParameter String url) {
return _doCheckUrl(url);
}
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/hudson/plugins/mercurial/browser/RhodeCode.java
Expand Up @@ -8,11 +8,9 @@
import java.net.MalformedURLException;
import java.net.URL;

import net.sf.json.JSONObject;

import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;

/**
* Mercurial web interface served using a <a
Expand Down Expand Up @@ -75,12 +73,6 @@ public String getDisplayName() {
return "rhodecode";
}

public @Override
RhodeCode newInstance(StaplerRequest req, JSONObject json)
throws FormException {
return req.bindParameters(RhodeCode.class, "rhodecode.");
}

@Override public FormValidation doCheckUrl(@QueryParameter String url) {
return _doCheckUrl(url);
}
Expand Down
Expand Up @@ -6,11 +6,9 @@
import java.net.MalformedURLException;
import java.net.URL;

import net.sf.json.JSONObject;

import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;

/**
* Mercurial web interface served using a <a
Expand Down Expand Up @@ -51,13 +49,6 @@ public String getDisplayName() {
return "rhodecode (pre-1.2.0)";
}

public @Override
RhodeCodeLegacy newInstance(StaplerRequest req, JSONObject json)
throws FormException {
return req.bindParameters(RhodeCodeLegacy.class,
"rhodecode-legacy.");
}

@Override public FormValidation doCheckUrl(@QueryParameter String url) {
return _doCheckUrl(url);
}
Expand Down
Expand Up @@ -54,4 +54,12 @@ public class HgBrowserSelectionTest {
assertTrue("Could not find BitBucket in " + browserDescriptors, browserDescriptors.contains(browser.getDescriptor()));
}

@Bug(20186)
@Test public void configureBrowser() throws Exception {
FreeStyleProject p = j.createFreeStyleProject();
p.setScm(new MercurialSCM(null, "https://host/repo", null, null, null, new HgWeb("https://host/repo"), false, null));
j.configRoundtrip(p);
assertEquals("https://host/repo/", ((MercurialSCM) p.getScm()).getBrowser().getUrl().toString());
}

}

0 comments on commit 651ce33

Please sign in to comment.