[jbosstools-commits] JBoss Tools SVN: r42287 - in trunk/openshift: plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core and 15 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Jun 28 11:33:05 EDT 2012


Author: adietish
Date: 2012-06-28 11:33:04 -0400 (Thu, 28 Jun 2012)
New Revision: 42287

Added:
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/egit/core/
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/egit/internal/
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/egit/internal/test/
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/egit/internal/test/util/
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/express/
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/express/internal/
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/express/internal/ui/
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/
Modified:
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/META-INF/MANIFEST.MF
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
   trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftExpressWizardModel.java
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java
   trunk/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF
   trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/EGitUtilsTest.java
   trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/util/TestRepository.java
Log:
[JBIDE-12240] bumped required egit/jgit version to 2.0. fixed compilation error due to API changes in Juno

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/META-INF/MANIFEST.MF	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/META-INF/MANIFEST.MF	2012-06-28 15:33:04 UTC (rev 42287)
@@ -5,8 +5,8 @@
 Bundle-Version: 2.3.0.qualifier
 Bundle-Activator: org.jboss.tools.openshift.egit.core.internal.EGitCoreActivator
 Require-Bundle: org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
- org.eclipse.jgit;bundle-version="1.2.0",
- org.eclipse.egit;bundle-version="1.2.0",
+ org.eclipse.jgit;bundle-version="2.0.0",
+ org.eclipse.egit;bundle-version="2.0.0",
  com.jcraft.jsch;bundle-version="0.1.44",
  org.eclipse.egit.core;bundle-version="1.2.0",
  org.eclipse.team.core;bundle-version="3.6.0",

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java	2012-06-28 15:33:04 UTC (rev 42287)
@@ -47,6 +47,7 @@
 import org.eclipse.jgit.api.Git;
 import org.eclipse.jgit.api.InitCommand;
 import org.eclipse.jgit.api.MergeResult;
+import org.eclipse.jgit.api.errors.GitAPIException;
 import org.eclipse.jgit.api.errors.JGitInternalException;
 import org.eclipse.jgit.errors.NoWorkTreeException;
 import org.eclipse.jgit.errors.NotSupportedException;
@@ -177,6 +178,11 @@
 					NLS.bind("Could not initialize a git repository at {0}: {1}",
 							getRepositoryPathFor(project),
 							e.getMessage()), e));
+		} catch (GitAPIException e) {
+			throw new CoreException(EGitCoreActivator.createErrorStatus(
+					NLS.bind("Could not initialize a git repository at {0}: {1}",
+							getRepositoryPathFor(project),
+							e.getMessage()), e));
 		}
 	}
 
@@ -873,8 +879,9 @@
 	 * @return
 	 * @throws IOException
 	 * @throws NoWorkTreeException
+	 * @throws GitAPIException 
 	 */
-	public static boolean isDirty(Repository repository) throws NoWorkTreeException, IOException {
+	public static boolean isDirty(Repository repository) throws NoWorkTreeException, IOException, GitAPIException {
 		boolean hasChanges = false;
 		org.eclipse.jgit.api.Status repoStatus = new Git(repository).status().call();
 		hasChanges |= !repoStatus.getAdded().isEmpty();

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF	2012-06-28 15:33:04 UTC (rev 42287)
@@ -5,11 +5,11 @@
 Bundle-Version: 2.3.0.qualifier
 Bundle-Activator: org.jboss.tools.openshift.egit.ui.EGitUIActivator
 Require-Bundle: org.jboss.tools.openshift.egit.core;bundle-version="[2.3.0,3.0.0)",
- org.eclipse.egit.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.egit.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.jgit;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.egit.core;bundle-version="2.0.0",
+ org.eclipse.egit.ui;bundle-version="2.0.0",
+ org.eclipse.jgit;bundle-version="2.0.0",
  com.jcraft.jsch;bundle-version="[0.1.44,1.0.0)",
- org.eclipse.ui;bundle-version="[3.7.0,4.0.0)",
+ org.eclipse.ui;bundle-version="3.7.0",
  org.eclipse.core.runtime,
  org.eclipse.core.expressions;bundle-version="[3.4.300,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.7.100,4.0.0)",

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF	2012-06-28 15:33:04 UTC (rev 42287)
@@ -9,8 +9,8 @@
  org.jboss.tools.openshift.egit.core;bundle-version="2.3.0",
  org.jboss.tools.openshift.egit.ui;bundle-version="2.3.0",
  org.jboss.ide.eclipse.as.ui;bundle-version="[2.3.0,3.0.0)",
- org.eclipse.egit.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.egit.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.egit.ui;bundle-version="1.1.0",
+ org.eclipse.egit.core;bundle-version="1.1.0",
  org.eclipse.jgit;bundle-version="[1.1.0,2.1.0)",
  com.jcraft.jsch;bundle-version="0.1.44",
  org.eclipse.jsch.core;bundle-version="[1.1.300,2.0.0)",

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftExpressWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftExpressWizardModel.java	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftExpressWizardModel.java	2012-06-28 15:33:04 UTC (rev 42287)
@@ -19,6 +19,8 @@
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jgit.api.errors.GitAPIException;
+import org.eclipse.jgit.errors.NoWorkTreeException;
 import org.eclipse.wst.server.core.IRuntime;
 import org.eclipse.wst.server.core.IServerType;
 import org.jboss.tools.common.databinding.IObservablePojo;
@@ -124,10 +126,12 @@
 	 *             clone to the user project
 	 * @throws CoreException
 	 *             The user project could not be shared with the git
+	 * @throws GitAPIException 
+	 * @throws NoWorkTreeException 
 	 */
 	public void configureGitSharedProject(IProgressMonitor monitor)
 			throws OpenShiftException, InvocationTargetException, InterruptedException, IOException, CoreException,
-			URISyntaxException;
+			URISyntaxException, NoWorkTreeException, GitAPIException;
 
 	public File getRepositoryFile();
 

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java	2012-06-28 15:33:04 UTC (rev 42287)
@@ -18,6 +18,7 @@
 import java.util.Set;
 
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.resources.WorkspaceJob;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -290,6 +291,7 @@
 
 		public ImportJob(DelegatingProgressMonitor delegatingMonitor) {
 			super("Importing project to workspace...");
+			setRule(ResourcesPlugin.getWorkspace().getRoot());
 			this.delegatingMonitor = delegatingMonitor;
 		}
 

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java	2012-06-28 15:33:04 UTC (rev 42287)
@@ -13,6 +13,8 @@
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jgit.api.errors.GitAPIException;
+import org.eclipse.jgit.errors.NoWorkTreeException;
 import org.eclipse.wst.server.core.IRuntime;
 import org.eclipse.wst.server.core.IServerType;
 import org.eclipse.wst.server.core.ServerCore;
@@ -145,11 +147,13 @@
 	 *             clone to the user project
 	 * @throws CoreException
 	 *             The user project could not be shared with the git
+	 * @throws GitAPIException 
+	 * @throws NoWorkTreeException 
 	 */
 	@Override
 	public void configureGitSharedProject(IProgressMonitor monitor)
 			throws OpenShiftException, InvocationTargetException, InterruptedException, IOException, CoreException,
-			URISyntaxException {
+			URISyntaxException, NoWorkTreeException, GitAPIException {
 		IProject project = new ConfigureGitSharedProject(
 				getProjectName()
 				, getApplication()

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java	2012-06-28 15:33:04 UTC (rev 42287)
@@ -23,6 +23,8 @@
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jgit.api.errors.GitAPIException;
+import org.eclipse.jgit.errors.NoWorkTreeException;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.transport.RemoteConfig;
 import org.eclipse.osgi.util.NLS;
@@ -80,6 +82,8 @@
 	 *             clone to the user project
 	 * @throws CoreException
 	 *             The user project could not be shared with the git
+	 * @throws GitAPIException 
+	 * @throws NoWorkTreeException 
 	 * 
 	 * @see #cloneRepository
 	 * @see #copyOpenshiftConfiguration
@@ -89,7 +93,7 @@
 	@Override
 	public IProject execute(IProgressMonitor monitor)
 			throws OpenShiftException, InvocationTargetException, InterruptedException, IOException, CoreException,
-			URISyntaxException {
+			URISyntaxException, NoWorkTreeException, GitAPIException {
 		IProject project = getProject();
 		Assert.isTrue(EGitUtils.isSharedWithGit(project));
 

Modified: trunk/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF	2012-06-28 15:33:04 UTC (rev 42287)
@@ -5,8 +5,8 @@
 Bundle-Version: 2.3.0.qualifier
 Bundle-Activator: org.jboss.tools.openshift.egit.internal.test.EGitTestActivator
 Bundle-Vendor: JBoss by Red Hat
-Require-Bundle: org.eclipse.egit.core;bundle-version="1.0.0",
- org.eclipse.jgit;bundle-version="[1.0.0,2.0.1]",
+Require-Bundle: org.eclipse.egit.core;bundle-version="2.0.0",
+ org.eclipse.jgit;bundle-version="2.0.0",
  org.eclipse.core.runtime,
  org.eclipse.core.resources;bundle-version="[3.7.100,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="1.3.100",

Modified: trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/EGitUtilsTest.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/EGitUtilsTest.java	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/EGitUtilsTest.java	2012-06-28 15:33:04 UTC (rev 42287)
@@ -17,6 +17,8 @@
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.egit.core.Activator;
+import org.eclipse.jgit.api.errors.GitAPIException;
+import org.eclipse.jgit.errors.NoWorkTreeException;
 import org.eclipse.jgit.lib.ConfigConstants;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.lib.StoredConfig;
@@ -196,7 +198,7 @@
 	}
 	
 	@Test
-	public void addedButNotCommittedIsDirty() throws IOException {
+	public void addedButNotCommittedIsDirty() throws IOException, NoWorkTreeException, GitAPIException {
 		assertFalse(EGitUtils.isDirty(testRepository.getRepository()));
 		File file = testRepository.createFile("a.txt", "protoculture");
 		testRepository.add(file);

Modified: trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/util/TestRepository.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/util/TestRepository.java	2012-06-28 15:09:22 UTC (rev 42286)
+++ trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/util/TestRepository.java	2012-06-28 15:33:04 UTC (rev 42287)
@@ -34,12 +34,10 @@
 import org.eclipse.egit.core.op.DisconnectProviderOperation;
 import org.eclipse.jgit.api.CommitCommand;
 import org.eclipse.jgit.api.Git;
-import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException;
+import org.eclipse.jgit.api.errors.GitAPIException;
 import org.eclipse.jgit.api.errors.JGitInternalException;
 import org.eclipse.jgit.api.errors.NoFilepatternException;
-import org.eclipse.jgit.api.errors.NoHeadException;
-import org.eclipse.jgit.api.errors.NoMessageException;
-import org.eclipse.jgit.api.errors.WrongRepositoryStateException;
+import org.eclipse.jgit.api.errors.UnmergedPathsException;
 import org.eclipse.jgit.dircache.DirCache;
 import org.eclipse.jgit.dircache.DirCacheEntry;
 import org.eclipse.jgit.errors.UnmergedPathException;
@@ -132,15 +130,11 @@
 	 *            commit message
 	 * @return commit object
 	 * @throws IOException
-	 * @throws NoHeadException
-	 * @throws NoMessageException
-	 * @throws ConcurrentRefUpdateException
 	 * @throws JGitInternalException
-	 * @throws WrongRepositoryStateException
+	 * @throws GitAPIException 
 	 */
 	public RevCommit createInitialCommit(String message) throws IOException,
-			NoHeadException, NoMessageException, ConcurrentRefUpdateException,
-			JGitInternalException, WrongRepositoryStateException {
+			JGitInternalException, GitAPIException {
 		String repoPath = repository.getWorkTree().getAbsolutePath();
 		File file = new File(repoPath, "dummy");
 		if (!file.exists())
@@ -252,17 +246,14 @@
 	 *            commit message
 	 * @return commit object
 	 * 
-	 * @throws NoHeadException
-	 * @throws NoMessageException
 	 * @throws UnmergedPathException
-	 * @throws ConcurrentRefUpdateException
 	 * @throws JGitInternalException
-	 * @throws WrongRepositoryStateException
+	 * @throws GitAPIException 
+	 * @throws UnmergedPathsException 
 	 */
-	public RevCommit commit(String message) throws NoHeadException,
-			NoMessageException, UnmergedPathException,
-			ConcurrentRefUpdateException, JGitInternalException,
-			WrongRepositoryStateException {
+	public RevCommit commit(String message) throws UnmergedPathException,
+			JGitInternalException,
+			UnmergedPathsException, GitAPIException {
 		Git git = new Git(repository);
 		CommitCommand commitCommand = git.commit();
 		commitCommand.setAuthor("J. Git", "j.git at egit.org");
@@ -271,7 +262,7 @@
 		return commitCommand.call();
 	}
 
-	public void add(IFile file) throws IOException {
+	public void add(IFile file) throws IOException, GitAPIException {
 		add(new File(file.getLocation().toOSString()));
 	}
 
@@ -280,8 +271,9 @@
 	 * 
 	 * @param file
 	 * @throws IOException
+	 * @throws GitAPIException 
 	 */
-	public void add(File file) throws IOException {
+	public void add(File file) throws IOException, GitAPIException {
 		String repoPath =
 				getRepoRelativePath(file.getAbsolutePath());
 		try {



More information about the jbosstools-commits mailing list