[jbosstools-commits] JBoss Tools SVN: r35916 - branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Oct 21 18:02:00 EDT 2011


Author: max.andersen at jboss.com
Date: 2011-10-21 18:02:00 -0400 (Fri, 21 Oct 2011)
New Revision: 35916

Modified:
   branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-10005 ignoring modules without git repo

Modified: branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java	2011-10-21 21:48:06 UTC (rev 35915)
+++ branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java	2011-10-21 22:02:00 UTC (rev 35916)
@@ -6,6 +6,7 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jgit.lib.Repository;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.MessageBox;
@@ -43,6 +44,13 @@
 			throws CoreException {
 		int state = behaviour.getServer().getModulePublishState(module);
 		IProject p = module[module.length-1].getProject();
+		
+		Repository repository = EGitUtils.getRepository(p);
+		
+		if (repository==null) {
+			return IServer.PUBLISH_STATE_UNKNOWN;
+		}
+		
 		int changed = EGitUtils.countCommitableChanges(p, new NullProgressMonitor() );
 		if( changed == 0 || (kind == IServer.PUBLISH_FULL || state == IServer.PUBLISH_STATE_FULL)) {
 			if( changed != 0 && requestCommitAndPushApproval(module, changed)) {



More information about the jbosstools-commits mailing list