JBoss Tools SVN: r34054 - trunk/build/aggregate/bottests-site/features/org.jboss.tools.bot.test.feature.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2011-08-18 11:04:19 -0400 (Thu, 18 Aug 2011)
New Revision: 34054
Modified:
trunk/build/aggregate/bottests-site/features/org.jboss.tools.bot.test.feature/feature.xml
Log:
* added Extension for teiid designer bot tests to the bottest-site
Modified: trunk/build/aggregate/bottests-site/features/org.jboss.tools.bot.test.feature/feature.xml
===================================================================
--- trunk/build/aggregate/bottests-site/features/org.jboss.tools.bot.test.feature/feature.xml 2011-08-18 15:00:45 UTC (rev 34053)
+++ trunk/build/aggregate/bottests-site/features/org.jboss.tools.bot.test.feature/feature.xml 2011-08-18 15:04:19 UTC (rev 34054)
@@ -36,6 +36,7 @@
<plugin id="org.jboss.tools.tests" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.tools.ui.bot.ext" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.tools.ui.bot.ext.test" download-size="0" install-size="0" version="0.0.0" />
+ <plugin id="org.teiid.designer.ui.bot.ext" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.tools.bpel.ui.bot.test" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.tools.cdi.bot.test" download-size="0" install-size="0" version="0.0.0" />
14 years, 8 months
JBoss Tools SVN: r34053 - trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/modules/org/jboss/tools/forge/runtime/ext/main.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-08-18 11:00:45 -0400 (Thu, 18 Aug 2011)
New Revision: 34053
Removed:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/modules/org/jboss/tools/forge/runtime/ext/main/module.xml
Log:
JBIDE-9561: try to put all the classes and resources in the main folder
Deleted: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/modules/org/jboss/tools/forge/runtime/ext/main/module.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/modules/org/jboss/tools/forge/runtime/ext/main/module.xml 2011-08-18 14:59:50 UTC (rev 34052)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/modules/org/jboss/tools/forge/runtime/ext/main/module.xml 2011-08-18 15:00:45 UTC (rev 34053)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<module xmlns="urn:jboss:module:1.0" name="org.jboss.tools.forge.runtime.ext">
-
- <resources>
- <resource-root path="../../../../../../../../bin" />
- </resources>
-
- <dependencies>
- <module name="org.jboss.forge.shell-api"/>
- <module name="javax.api"/>
- </dependencies>
-
-</module>
14 years, 8 months
JBoss Tools SVN: r34052 - in trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src: org/jboss/tools/forge/runtime/ext and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-08-18 10:59:50 -0400 (Thu, 18 Aug 2011)
New Revision: 34052
Removed:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/beans.xml
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/forge.xml
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java
Log:
JBIDE-9561: try to put all the classes and resources in the main folder
Deleted: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/beans.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/beans.xml 2011-08-18 14:58:34 UTC (rev 34051)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/beans.xml 2011-08-18 14:59:50 UTC (rev 34052)
@@ -1,5 +0,0 @@
-<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
-</beans>
Deleted: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/forge.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/forge.xml 2011-08-18 14:58:34 UTC (rev 34051)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/forge.xml 2011-08-18 14:59:50 UTC (rev 34052)
@@ -1 +0,0 @@
-<forge/>
\ No newline at end of file
Deleted: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java 2011-08-18 14:58:34 UTC (rev 34051)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java 2011-08-18 14:59:50 UTC (rev 34052)
@@ -1,24 +0,0 @@
-package org.jboss.tools.forge.runtime.ext;
-
-import javax.enterprise.event.Observes;
-import javax.inject.Inject;
-
-import org.jboss.forge.shell.Shell;
-import org.jboss.forge.shell.events.PostStartup;
-
-public class EventHandler {
-
- private static final String ESCAPE = new String(new char[] { 27, '[', '%'} );
-
- @Inject
- private Shell shell;
-
- public void startup(@Observes PostStartup event) {
- sendEscaped("PostStartup");
- }
-
- private void sendEscaped(String str) {
- shell.print(ESCAPE + str + ESCAPE);
- }
-
-}
Deleted: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java 2011-08-18 14:58:34 UTC (rev 34051)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java 2011-08-18 14:59:50 UTC (rev 34052)
@@ -1,71 +0,0 @@
-package org.jboss.tools.forge.runtime.ext;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.inject.Inject;
-
-import org.jboss.forge.shell.Shell;
-import org.jboss.forge.shell.command.CommandMetadata;
-import org.jboss.forge.shell.command.PluginMetadata;
-import org.jboss.forge.shell.command.PluginRegistry;
-import org.jboss.forge.shell.spi.TriggeredAction;
-
-public class MetaCommandTriggeredAction implements TriggeredAction {
-
- private static final String ESCAPE = new String(new char[] { 27, '[', '%' });
-
- @Inject Shell shell;
-
- @Inject PluginRegistry registry;
-
- @Override
- public ActionListener getListener() {
- return new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- try {
- shell.print(ESCAPE);
- String text = shell.readLine();
- shell.print(ESCAPE);
- handleHiddenCommand(text);
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- }
- };
- }
-
- private void handleHiddenCommand(String text) {
- if ("plugin-candidates-query".equals(text)) {
- shell.print(ESCAPE + "plugin-candidates-answer: " + getPluginCandidates() + ESCAPE);
- }
- }
-
- private String getPluginCandidates() {
- StringBuffer resultBuffer = new StringBuffer();
- Map<String, List<PluginMetadata>> plugins = registry.getPlugins();
- for (Entry<String, List<PluginMetadata>> entry : plugins.entrySet()) {
- for (PluginMetadata pluginMeta : entry.getValue()) {
- List<CommandMetadata> commands = pluginMeta.getAllCommands();
- if (!commands.isEmpty()) {
- resultBuffer.append("p:").append(pluginMeta.getName()).append(' ');
- for (CommandMetadata commandMeta : commands) {
- resultBuffer.append("c:").append(commandMeta.getName()).append(' ');
- }
- }
- }
- }
- return resultBuffer.toString();
- }
-
- @Override
- public char getTrigger() {
- return (char)31;
- }
-
-}
14 years, 8 months
JBoss Tools SVN: r34051 - in trunk/forge/plugins/org.jboss.tools.forge.runtime.ext: META-INF and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-08-18 10:58:34 -0400 (Thu, 18 Aug 2011)
New Revision: 34051
Added:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/beans.xml
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/forge.xml
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/module.xml
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/runtime/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/runtime/ext/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/runtime/ext/EventHandler.java
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java
Log:
JBIDE-9561: try to put all the classes and resources in the main folder
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/beans.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/beans.xml (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/beans.xml 2011-08-18 14:58:34 UTC (rev 34051)
@@ -0,0 +1,5 @@
+<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+</beans>
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/forge.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/forge.xml (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/forge.xml 2011-08-18 14:58:34 UTC (rev 34051)
@@ -0,0 +1 @@
+<forge/>
\ No newline at end of file
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/module.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/module.xml (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/module.xml 2011-08-18 14:58:34 UTC (rev 34051)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.tools.forge.runtime.ext">
+
+ <resources>
+ <resource-root path="../../../../../../../../bin" />
+ </resources>
+
+ <dependencies>
+ <module name="org.jboss.forge.shell-api"/>
+ <module name="javax.api"/>
+ </dependencies>
+
+</module>
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/runtime/ext/EventHandler.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/runtime/ext/EventHandler.java (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/runtime/ext/EventHandler.java 2011-08-18 14:58:34 UTC (rev 34051)
@@ -0,0 +1,24 @@
+package org.jboss.tools.forge.runtime.ext;
+
+import javax.enterprise.event.Observes;
+import javax.inject.Inject;
+
+import org.jboss.forge.shell.Shell;
+import org.jboss.forge.shell.events.PostStartup;
+
+public class EventHandler {
+
+ private static final String ESCAPE = new String(new char[] { 27, '[', '%'} );
+
+ @Inject
+ private Shell shell;
+
+ public void startup(@Observes PostStartup event) {
+ sendEscaped("PostStartup");
+ }
+
+ private void sendEscaped(String str) {
+ shell.print(ESCAPE + str + ESCAPE);
+ }
+
+}
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java 2011-08-18 14:58:34 UTC (rev 34051)
@@ -0,0 +1,71 @@
+package org.jboss.tools.forge.runtime.ext;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.inject.Inject;
+
+import org.jboss.forge.shell.Shell;
+import org.jboss.forge.shell.command.CommandMetadata;
+import org.jboss.forge.shell.command.PluginMetadata;
+import org.jboss.forge.shell.command.PluginRegistry;
+import org.jboss.forge.shell.spi.TriggeredAction;
+
+public class MetaCommandTriggeredAction implements TriggeredAction {
+
+ private static final String ESCAPE = new String(new char[] { 27, '[', '%' });
+
+ @Inject Shell shell;
+
+ @Inject PluginRegistry registry;
+
+ @Override
+ public ActionListener getListener() {
+ return new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ try {
+ shell.print(ESCAPE);
+ String text = shell.readLine();
+ shell.print(ESCAPE);
+ handleHiddenCommand(text);
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ }
+ };
+ }
+
+ private void handleHiddenCommand(String text) {
+ if ("plugin-candidates-query".equals(text)) {
+ shell.print(ESCAPE + "plugin-candidates-answer: " + getPluginCandidates() + ESCAPE);
+ }
+ }
+
+ private String getPluginCandidates() {
+ StringBuffer resultBuffer = new StringBuffer();
+ Map<String, List<PluginMetadata>> plugins = registry.getPlugins();
+ for (Entry<String, List<PluginMetadata>> entry : plugins.entrySet()) {
+ for (PluginMetadata pluginMeta : entry.getValue()) {
+ List<CommandMetadata> commands = pluginMeta.getAllCommands();
+ if (!commands.isEmpty()) {
+ resultBuffer.append("p:").append(pluginMeta.getName()).append(' ');
+ for (CommandMetadata commandMeta : commands) {
+ resultBuffer.append("c:").append(commandMeta.getName()).append(' ');
+ }
+ }
+ }
+ }
+ return resultBuffer.toString();
+ }
+
+ @Override
+ public char getTrigger() {
+ return (char)31;
+ }
+
+}
14 years, 8 months
JBoss Tools SVN: r34050 - trunk/build/aggregate/bottests-site/features/org.jboss.tools.bot.test.feature.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2011-08-18 10:38:49 -0400 (Thu, 18 Aug 2011)
New Revision: 34050
Modified:
trunk/build/aggregate/bottests-site/features/org.jboss.tools.bot.test.feature/feature.xml
Log:
* Teiid Designer bot tests added to the bottest-site
Modified: trunk/build/aggregate/bottests-site/features/org.jboss.tools.bot.test.feature/feature.xml
===================================================================
--- trunk/build/aggregate/bottests-site/features/org.jboss.tools.bot.test.feature/feature.xml 2011-08-18 13:55:43 UTC (rev 34049)
+++ trunk/build/aggregate/bottests-site/features/org.jboss.tools.bot.test.feature/feature.xml 2011-08-18 14:38:49 UTC (rev 34050)
@@ -53,5 +53,5 @@
<plugin id="org.jboss.tools.struts.ui.bot.test" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.tools.vpe.ui.bot.test" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.tools.ws.ui.bot.test" download-size="0" install-size="0" version="0.0.0" />
-
+ <plugin id="org.teiid.designer.ui.bot.tests" download-size="0" install-size="0" version="0.0.0" />
</feature>
14 years, 8 months
JBoss Tools SVN: r34049 - trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/src/org/jboss/ide/eclipse/as/egit/internal/test.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-08-18 09:55:43 -0400 (Thu, 18 Aug 2011)
New Revision: 34049
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/src/org/jboss/ide/eclipse/as/egit/internal/test/EGitUtilsTest.java
Log:
[JBIDE-9513] implemented push test
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/src/org/jboss/ide/eclipse/as/egit/internal/test/EGitUtilsTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/src/org/jboss/ide/eclipse/as/egit/internal/test/EGitUtilsTest.java 2011-08-18 13:55:36 UTC (rev 34048)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/src/org/jboss/ide/eclipse/as/egit/internal/test/EGitUtilsTest.java 2011-08-18 13:55:43 UTC (rev 34049)
@@ -13,9 +13,11 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.egit.core.Activator;
+import org.eclipse.egit.core.RepositoryCache;
import org.eclipse.egit.core.op.AddToIndexOperation;
import org.eclipse.egit.core.op.CloneOperation;
import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.util.FileUtils;
@@ -39,7 +41,7 @@
private Repository repository;
private TestProject testProject;
private IProject project;
- private File clonedRepositoryFile;
+ private TestRepository clonedTestRepository;
@Before
public void setUp() throws Exception {
@@ -55,22 +57,22 @@
this.repository = testRepository.getRepository();
testRepository.connect(project);
- TestProject testProject2 = new TestProject(true);
- // File gitDir2 = createGitDir(testProject2);
- // TestRepository testRepository2 = new TestRepository(gitDir2);
- // Repository repository2 = testRepository.getRepository();
-
- this.clonedRepositoryFile = cloneRepository(repository);
+ this.clonedTestRepository = cloneRepository(repository);
}
- private File cloneRepository(Repository repository) throws URISyntaxException, InvocationTargetException,
- InterruptedException {
+ private TestRepository cloneRepository(Repository repository) throws URISyntaxException, InvocationTargetException,
+ InterruptedException, IOException {
URIish uri = new URIish("file:///" + repository.getDirectory().toString());
String repoParent = repository.getDirectory().getParent();
- File clonedRepository = new File("clonedRepository" + String.valueOf(System.currentTimeMillis()), repoParent);
- CloneOperation clop = new CloneOperation(uri, true, null, clonedRepository, "refs/heads/master", "origin", 0);
+ File clonedRepositoryFile =
+ new File(repoParent, "clonedRepository-" + String.valueOf(System.currentTimeMillis()));
+ CloneOperation clop =
+ new CloneOperation(uri, true, null, clonedRepositoryFile, "refs/heads/master", "origin", 0);
clop.run(null);
- return clonedRepository;
+ RepositoryCache repositoryCache = Activator.getDefault().getRepositoryCache();
+ Repository clonedRepository =
+ repositoryCache.lookupRepository(new File(clonedRepositoryFile, Constants.DOT_GIT));
+ return new TestRepository(clonedRepository);
}
private void createMockSystemReader() {
@@ -96,19 +98,20 @@
@After
public void tearDown() throws Exception {
- testRepository.dispose();
- repository = null;
-
+ cleanupRepository(testRepository);
+ cleanupRepository(clonedTestRepository);
+
testProject.dispose();
project = null;
Activator.getDefault().getRepositoryCache().clear();
- if (gitDir.exists()) {
- FileUtils.delete(gitDir, FileUtils.RECURSIVE | FileUtils.RETRY);
+ }
+
+ private static void cleanupRepository(TestRepository testRepository) throws IOException {
+ File repositoryDirectory = testRepository.getRepository().getDirectory();
+ if (repositoryDirectory.exists()) {
+ FileUtils.delete(repositoryDirectory, FileUtils.RECURSIVE | FileUtils.RETRY);
}
-
- if (clonedRepositoryFile.exists()) {
- FileUtils.delete(clonedRepositoryFile, FileUtils.RECURSIVE | FileUtils.RETRY);
- }
+ testRepository.dispose();
}
@Test
@@ -119,20 +122,19 @@
resources.add(file);
new AddToIndexOperation(resources).execute(null);
- EgitUtils.commit(testProject.getProject(), null);
+ EgitUtils.commit(project, null);
testUtils.assertRepositoryContainsFiles(repository, new String[] { testUtils.getRepositoryPath(file) });
}
@Test
public void canPushRepoToAntoherRepo() throws Exception {
- IFile file = testUtils.addFileToProject(
- testProject.getProject(),
- "a.txt", "some text");
+ IFile file = testUtils.addFileToProject(testProject.getProject(), "a.txt", "some text");
resources.add(file);
new AddToIndexOperation(resources).execute(null);
+ EgitUtils.commit(project, null);
- EgitUtils.push(testProject.getProject(), null);
+ EgitUtils.push(clonedTestRepository.getRepository(), null);
testUtils.assertRepositoryContainsFiles(repository, new String[] { testUtils.getRepositoryPath(file) });
}
14 years, 8 months
JBoss Tools SVN: r34048 - trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-08-18 09:55:36 -0400 (Thu, 18 Aug 2011)
New Revision: 34048
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitUtils.java
Log:
[JBIDE-9513] implemented push test
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitUtils.java 2011-08-18 13:07:28 UTC (rev 34047)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitUtils.java 2011-08-18 13:55:36 UTC (rev 34048)
@@ -77,11 +77,6 @@
op.execute(monitor);
}
- public static void push(IProject project, IProgressMonitor monitor)
- throws CoreException {
- push(getRepository(project), monitor);
- }
-
/**
* Pushes the given repository to it's configured remote.
*
@@ -103,6 +98,8 @@
}
PushOperation pop = createPushOperation(repository, remoteConfig);
pop.run(monitor);
+ } catch (CoreException e) {
+ throw e;
} catch (Exception e) {
IStatus status = new Status(IStatus.ERROR, EGitCoreActivator.PLUGIN_ID,
NLS.bind("Could not push repo {0}", repository.toString()), e);
14 years, 8 months
JBoss Tools SVN: r34047 - trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/src/org/jboss/ide/eclipse/as/egit/internal/test.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-08-18 09:07:28 -0400 (Thu, 18 Aug 2011)
New Revision: 34047
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/src/org/jboss/ide/eclipse/as/egit/internal/test/EGitUtilsTest.java
Log:
[JBIDE-9513] implemented push test
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/src/org/jboss/ide/eclipse/as/egit/internal/test/EGitUtilsTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/src/org/jboss/ide/eclipse/as/egit/internal/test/EGitUtilsTest.java 2011-08-18 13:07:18 UTC (rev 34046)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/src/org/jboss/ide/eclipse/as/egit/internal/test/EGitUtilsTest.java 2011-08-18 13:07:28 UTC (rev 34047)
@@ -2,6 +2,8 @@
import java.io.File;
import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
@@ -12,8 +14,10 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.egit.core.Activator;
import org.eclipse.egit.core.op.AddToIndexOperation;
+import org.eclipse.egit.core.op.CloneOperation;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.util.FileUtils;
import org.eclipse.jgit.util.SystemReader;
import org.jboss.ide.eclipse.as.egit.core.EgitUtils;
@@ -35,6 +39,7 @@
private Repository repository;
private TestProject testProject;
private IProject project;
+ private File clonedRepositoryFile;
@Before
public void setUp() throws Exception {
@@ -44,12 +49,30 @@
this.project = testProject.getProject();
createMockSystemReader();
+
this.gitDir = createGitDir(testProject);
this.testRepository = new TestRepository(gitDir);
this.repository = testRepository.getRepository();
testRepository.connect(project);
+
+ TestProject testProject2 = new TestProject(true);
+ // File gitDir2 = createGitDir(testProject2);
+ // TestRepository testRepository2 = new TestRepository(gitDir2);
+ // Repository repository2 = testRepository.getRepository();
+
+ this.clonedRepositoryFile = cloneRepository(repository);
}
+ private File cloneRepository(Repository repository) throws URISyntaxException, InvocationTargetException,
+ InterruptedException {
+ URIish uri = new URIish("file:///" + repository.getDirectory().toString());
+ String repoParent = repository.getDirectory().getParent();
+ File clonedRepository = new File("clonedRepository" + String.valueOf(System.currentTimeMillis()), repoParent);
+ CloneOperation clop = new CloneOperation(uri, true, null, clonedRepository, "refs/heads/master", "origin", 0);
+ clop.run(null);
+ return clonedRepository;
+ }
+
private void createMockSystemReader() {
MockSystemReader mockSystemReader = new MockSystemReader();
SystemReader.setInstance(mockSystemReader);
@@ -82,6 +105,10 @@
if (gitDir.exists()) {
FileUtils.delete(gitDir, FileUtils.RECURSIVE | FileUtils.RETRY);
}
+
+ if (clonedRepositoryFile.exists()) {
+ FileUtils.delete(clonedRepositoryFile, FileUtils.RECURSIVE | FileUtils.RETRY);
+ }
}
@Test
@@ -92,14 +119,22 @@
resources.add(file);
new AddToIndexOperation(resources).execute(null);
- EgitUtils.commit(testProject.getProject());
+ EgitUtils.commit(testProject.getProject(), null);
testUtils.assertRepositoryContainsFiles(repository, new String[] { testUtils.getRepositoryPath(file) });
}
@Test
- public void canPushRepoToAntoherRepo() {
-// EgitUtils.push(project, destinationRepository)
+ public void canPushRepoToAntoherRepo() throws Exception {
+ IFile file = testUtils.addFileToProject(
+ testProject.getProject(),
+ "a.txt", "some text");
+ resources.add(file);
+ new AddToIndexOperation(resources).execute(null);
+
+ EgitUtils.push(testProject.getProject(), null);
+
+ testUtils.assertRepositoryContainsFiles(repository, new String[] { testUtils.getRepositoryPath(file) });
}
-
+
}
14 years, 8 months
JBoss Tools SVN: r34046 - trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-08-18 09:07:18 -0400 (Thu, 18 Aug 2011)
New Revision: 34046
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitUtils.java
Log:
[JBIDE-9513] implemented push to (preconfigured) remote repo. Missing: choose remote repo among several available ones & tests are also missing yet
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitUtils.java 2011-08-18 12:32:50 UTC (rev 34045)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitUtils.java 2011-08-18 13:07:18 UTC (rev 34046)
@@ -49,10 +49,6 @@
private static final int PUSH_TIMEOUT = 10 * 1024;
- public static void commit(IProject project) throws CoreException {
- commit(project, null);
- }
-
/**
* Commits the given project to it's configured repository.
*
14 years, 8 months