Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2015-05-08 17:01:13 +0000
committerFrank Becker2015-05-08 17:04:21 +0000
commit6edf650671f7b35b5abc0533fc23d5b3bb9a5e67 (patch)
tree692cf82e39890af626632da7d48821bd0c04fdc0
parent328a6b25a3df95116c67b479688c2a918f36da75 (diff)
downloadorg.eclipse.mylyn.tasks-6edf650671f7b35b5abc0533fc23d5b3bb9a5e67.tar.gz
org.eclipse.mylyn.tasks-6edf650671f7b35b5abc0533fc23d5b3bb9a5e67.tar.xz
org.eclipse.mylyn.tasks-6edf650671f7b35b5abc0533fc23d5b3bb9a5e67.zip
464954: update of Bugzilla to Version 5.0rc3+
Change-Id: I92c183bfbc92b7166190106eee808e81ab07ea04 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464954
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/config/local-All-BugzillaRestCoreTests.launch2
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java7
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestClient.java25
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/response/data/RestResult.java9
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp11
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp2
6 files changed, 24 insertions, 32 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/config/local-All-BugzillaRestCoreTests.launch b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/config/local-All-BugzillaRestCoreTests.launch
index 6d97746c7..978b5b2ad 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/config/local-All-BugzillaRestCoreTests.launch
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/config/local-All-BugzillaRestCoreTests.launch
@@ -29,7 +29,7 @@
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -consolelog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.mylyn.bugzilla.rest.core.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#10;-Xmx256m&#10;-XX:MaxPermSize=128m&#10;-Dorg.eclipse.mylyn.tests.all=true&#10;-Dmylyn.tests.configuration.url=http://localhost:2080/bugzilla-rest-trunk"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx256m -XX:MaxPermSize=128m&#10;-Dorg.eclipse.mylyn.tests.all=true"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java
index be3309fc8..87939a321 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java
@@ -28,7 +28,6 @@ import org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials;
import org.eclipse.mylyn.commons.repositories.http.core.CommonHttpResponse;
import org.eclipse.mylyn.commons.repositories.http.core.HttpUtil;
import org.eclipse.mylyn.internal.bugzilla.rest.core.response.data.LoginToken;
-import org.eclipse.mylyn.internal.bugzilla.rest.core.response.data.RestResult;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
@@ -64,12 +63,12 @@ public class BugzillaRestAuthenticatedGetRequest<T> extends BugzillaRestRequest<
new AuthenticationRequest<AuthenticationType<UserCredentials>>(getClient().getLocation(),
AuthenticationType.REPOSITORY));
} else {
- TypeToken<RestResult<LoginToken>> type = new TypeToken<RestResult<LoginToken>>() {
+ TypeToken<LoginToken> type = new TypeToken<LoginToken>() {
};
InputStream is = response.getEntity().getContent();
InputStreamReader in = new InputStreamReader(is);
- RestResult<LoginToken> loginToken = new Gson().fromJson(in, type.getType());
- ((BugzillaRestHttpClient) getClient()).setLoginToken(loginToken.getResult());
+ LoginToken loginToken = new Gson().fromJson(in, type.getType());
+ ((BugzillaRestHttpClient) getClient()).setLoginToken(loginToken);
getClient().setAuthenticated(true);
}
} finally {
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestClient.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestClient.java
index 7d2932863..d118e5020 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestClient.java
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestClient.java
@@ -26,7 +26,6 @@ import org.eclipse.mylyn.internal.bugzilla.rest.core.response.data.ParameterResp
import org.eclipse.mylyn.internal.bugzilla.rest.core.response.data.Product;
import org.eclipse.mylyn.internal.bugzilla.rest.core.response.data.ProductResponse;
import org.eclipse.mylyn.internal.bugzilla.rest.core.response.data.RestResponse;
-import org.eclipse.mylyn.internal.bugzilla.rest.core.response.data.RestResult;
import org.eclipse.mylyn.internal.bugzilla.rest.core.response.data.VersionResponse;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -49,10 +48,10 @@ public class BugzillaRestClient {
public BugzillaRestVersion getVersion(IOperationMonitor monitor) throws BugzillaRestException {
- RestResult<VersionResponse> versionResponse = new BugzillaRestUnauthenticatedGetRequest<RestResult<VersionResponse>>(
- client, "/version", new TypeToken<RestResult<VersionResponse>>() {
+ VersionResponse versionResponse = new BugzillaRestUnauthenticatedGetRequest<VersionResponse>(client, "/version",
+ new TypeToken<VersionResponse>() {
}).run(monitor);
- return new BugzillaRestVersion(versionResponse.getResult().getVersion());
+ return new BugzillaRestVersion(versionResponse.getVersion());
}
public boolean validate(IOperationMonitor monitor) throws BugzillaRestException {
@@ -70,15 +69,15 @@ public class BugzillaRestClient {
return config;
} catch (Exception e) {
StatusHandler
- .log(new Status(IStatus.ERROR, BugzillaRestCore.ID_PLUGIN, "Could not get the Configuration", e)); //$NON-NLS-1$
+ .log(new Status(IStatus.ERROR, BugzillaRestCore.ID_PLUGIN, "Could not get the Configuration", e)); //$NON-NLS-1$
return null;
}
}
- public <R extends RestResult<RestResponse<E>>, E extends Named> Map<String, E> retrieveItems(
- IOperationMonitor monitor, String path, TypeToken typeToken) throws BugzillaRestException {
+ public <R extends RestResponse<E>, E extends Named> Map<String, E> retrieveItems(IOperationMonitor monitor,
+ String path, TypeToken typeToken) throws BugzillaRestException {
R response = new BugzillaRestAuthenticatedGetRequest<R>(client, path, typeToken).run(monitor);
- E[] members = response.getResult().getArray();
+ E[] members = response.getArray();
return Maps.uniqueIndex(Lists.newArrayList(members), new Function<E, String>() {
public String apply(E input) {
return input.getName();
@@ -87,19 +86,19 @@ public class BugzillaRestClient {
}
private Map<String, Field> getFields(IOperationMonitor monitor) throws BugzillaRestException {
- return retrieveItems(monitor, "/field/bug?", new TypeToken<RestResult<FieldResponse>>() {
+ return retrieveItems(monitor, "/field/bug?", new TypeToken<FieldResponse>() {
});
}
private Map<String, Product> getProducts(IOperationMonitor monitor) throws BugzillaRestException {
- return retrieveItems(monitor, "/product?type=accessible", new TypeToken<RestResult<ProductResponse>>() { //$NON-NLS-1$
+ return retrieveItems(monitor, "/product?type=accessible", new TypeToken<ProductResponse>() { //$NON-NLS-1$
});
}
public ParameterResponse getParameters(IOperationMonitor monitor) throws BugzillaRestException {
- return new BugzillaRestAuthenticatedGetRequest<RestResult<ParameterResponse>>(client, "/parameters?",
- new TypeToken<RestResult<ParameterResponse>>() {
- }).run(monitor).getResult();
+ return new BugzillaRestAuthenticatedGetRequest<ParameterResponse>(client, "/parameters?",
+ new TypeToken<ParameterResponse>() {
+ }).run(monitor);
}
}
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/response/data/RestResult.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/response/data/RestResult.java
deleted file mode 100644
index 7a2f5a37b..000000000
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/response/data/RestResult.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.eclipse.mylyn.internal.bugzilla.rest.core.response.data;
-
-public class RestResult<T> {
- private T result;
-
- public T getResult() {
- return result;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
index ab54f1501..2582bb264 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
@@ -66,10 +66,11 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug
branch => "5.0",
envversion => "5.0rc3",
}
-
+
bugzilla::site { "bugzilla-master":
major => "5",
minor => "1",
+ branch => "master",
branchTag => "HEAD",
envversion => "5.1",
envinfo => "Master",
@@ -79,21 +80,23 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug
* REST sites
*******************************************************************************/
- bugzilla::site { "bugzilla-5.0rc3-rest":
+ bugzilla::site { "bugzilla-rest-5.0-head":
major => "5",
minor => "0",
branch => "5.0",
- branchTag => "bugzilla-5.0rc3",
+ branchTag => "HEAD",
envtype => "bugzillaREST",
rest_enabled => true,
envdefault_rest => true,
- envversion => "5.0rc3",
+ envversion => "5.0rc3+",
testdataVersion => "Version1",
}
+
bugzilla::site { "bugzilla-rest-master":
major => "5",
minor => "1",
+ branch => "master",
branchTag => "HEAD",
envversion => "5.1",
envinfo => "Master",
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
index c6cedebc5..16263838d 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
@@ -132,7 +132,7 @@ define bugzilla::site (
}
exec { "$branch $branchTag git clone $version":
- command => "git clone http://git.mozilla.org/bugzilla/bugzilla $base/$version",
+ command => "git clone -b $branch http://git.mozilla.org/bugzilla/bugzilla $base/$version",
cwd => "$base",
user => "$userOwner",
timeout => 300,

Back to the top