[jbosstools-commits] JBoss Tools SVN: r40748 - trunk/openshift/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
Thu May 3 07:37:12 EDT 2012
Author: rob.stryker at jboss.com
Date: 2012-05-03 07:37:11 -0400 (Thu, 03 May 2012)
New Revision: 40748
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-11565 to trunk
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-05-03 11:19:42 UTC (rev 40747)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-05-03 11:37:11 UTC (rev 40748)
@@ -178,6 +178,11 @@
ExpressServerUtils.ATTRIBUTE_REMOTE_NAME_DEFAULT);
PushOperationResult result = null;
boolean committed = false;
+ Repository repo = EGitUtils.getRepository(p);
+ if( repo == null ) {
+ throw new CoreException(new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
+ NLS.bind("No repository found for project {0}. Please ensure it is shared via git.", p.getName())));
+ }
try {
if( changed != 0 && requestCommitAndPushApproval(p.getName(), changed)) {
monitor.beginTask("Publishing " + p.getName(), 300);
@@ -188,7 +193,7 @@
if( committed || (changed == 0 && requestPushApproval(p.getName()))) {
if( !committed )
monitor.beginTask("Publishing " + p.getName(), 200);
- result = EGitUtils.push(remoteName, EGitUtils.getRepository(p), new SubProgressMonitor(monitor, 100));
+ result = EGitUtils.push(remoteName, repo, new SubProgressMonitor(monitor, 100));
monitor.done();
}
} catch(CoreException ce) {
@@ -197,8 +202,7 @@
return null;
try {
- Repository repository = EGitUtils.getRepository(p);
- result = EGitUtils.pushForce(remoteName, repository, new SubProgressMonitor(monitor, 100));
+ result = EGitUtils.pushForce(remoteName, repo, new SubProgressMonitor(monitor, 100));
monitor.done();
} catch(CoreException ce2) {
// even the push force failed, and we don't have a valid result to check :(
More information about the jbosstools-commits
mailing list