summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Enoch2014-03-03 18:25:19 (EST)
committerEike Stepper2014-03-05 03:19:03 (EST)
commit4667ac85a8138f08813551ffdc4d572299ce0704 (patch)
treed575ec95ed7aeaf6ce5947e755db461eb8a7177d
parent7436833c4b49c9c0973e4ac0ce232f8784defd18 (diff)
downloadcdo-4667ac85a8138f08813551ffdc4d572299ce0704.zip
cdo-4667ac85a8138f08813551ffdc4d572299ce0704.tar.gz
cdo-4667ac85a8138f08813551ffdc4d572299ce0704.tar.bz2
[429520] Support additional push URL in the GitCloneTask refs/changes/30/22830/3
https://bugs.eclipse.org/bugs/show_bug.cgi?id=429520 Change-Id: Ib0eaafcd557cd6e0d3bab5d9e98ff2905b85bfa2 Signed-off-by: Julian Enoch <julian.enoch@ericsson.com>
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/plugin.properties1
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/ComponentDefinitionItemProvider.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/ComponentExtensionItemProvider.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/GitCloneTaskItemProvider.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/IndexItemProvider.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/MetaIndexItemProvider.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/RepositoryListItemProvider.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletDataItemProvider.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletImportTaskItemProvider.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletItemProvider.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletTaskItemProvider.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecore1
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/model/setup.genmodel5
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/internal/setup/AbstractSetupTaskContext.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/GitCloneTask.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupPackage.java34
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupTaskContext.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/GitCloneTaskImpl.java140
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/MaterializationTaskImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/P2TaskImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupPackageImpl.java17
21 files changed, 260 insertions, 46 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.releng.setup.edit/plugin.properties
index 3536f94..414228c 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/plugin.properties
@@ -284,3 +284,4 @@ _UI_VariableType_URI_literal = URI
_UI_WorkingSetTask_type = Working Sets
_UI_WorkingSetTask_workingSetGroup_feature = Working Sets
_UI_WorkingSetTask_workingSets_feature = Working Sets
+_UI_GitCloneTask_pushURI_feature = Push URI
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/ComponentDefinitionItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/ComponentDefinitionItemProvider.java
index 7af54ec..3fca6e6 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/ComponentDefinitionItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/ComponentDefinitionItemProvider.java
@@ -37,8 +37,8 @@ import java.util.List;
* @generated
*/
public class ComponentDefinitionItemProvider extends ComponentExtensionItemProvider implements
-IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider,
-IItemPropertySource
+ IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider,
+ IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
@@ -84,7 +84,7 @@ IItemPropertySource
getString("_UI_ComponentDefinition_iD_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ComponentDefinition_iD_feature",
"_UI_ComponentDefinition_type"), SetupPackage.Literals.COMPONENT_DEFINITION__ID, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
@@ -101,7 +101,7 @@ IItemPropertySource
getString("_UI_ComponentDefinition_version_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ComponentDefinition_version_feature",
"_UI_ComponentDefinition_type"), SetupPackage.Literals.COMPONENT_DEFINITION__VERSION, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/ComponentExtensionItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/ComponentExtensionItemProvider.java
index 1bf98db..fe1a99e 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/ComponentExtensionItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/ComponentExtensionItemProvider.java
@@ -38,7 +38,7 @@ import java.util.List;
* @generated
*/
public class ComponentExtensionItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
-IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/GitCloneTaskItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/GitCloneTaskItemProvider.java
index e6618fe..fef0f2d 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/GitCloneTaskItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/GitCloneTaskItemProvider.java
@@ -64,6 +64,7 @@ public class GitCloneTaskItemProvider extends SetupTaskItemProvider implements I
addLocationPropertyDescriptor(object);
addRemoteNamePropertyDescriptor(object);
addRemoteURIPropertyDescriptor(object);
+ addPushURIPropertyDescriptor(object);
addUserIDPropertyDescriptor(object);
addCheckoutBranchPropertyDescriptor(object);
}
@@ -138,6 +139,22 @@ public class GitCloneTaskItemProvider extends SetupTaskItemProvider implements I
}
/**
+ * This adds a property descriptor for the Push URI feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPushURIPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_GitCloneTask_pushURI_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GitCloneTask_pushURI_feature", "_UI_GitCloneTask_type"),
+ SetupPackage.Literals.GIT_CLONE_TASK__PUSH_URI, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
* This adds a property descriptor for the User ID feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -212,6 +229,7 @@ public class GitCloneTaskItemProvider extends SetupTaskItemProvider implements I
case SetupPackage.GIT_CLONE_TASK__LOCATION:
case SetupPackage.GIT_CLONE_TASK__REMOTE_NAME:
case SetupPackage.GIT_CLONE_TASK__REMOTE_URI:
+ case SetupPackage.GIT_CLONE_TASK__PUSH_URI:
case SetupPackage.GIT_CLONE_TASK__USER_ID:
case SetupPackage.GIT_CLONE_TASK__CHECKOUT_BRANCH:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/IndexItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/IndexItemProvider.java
index 819d84ed..d6e9595 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/IndexItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/IndexItemProvider.java
@@ -38,7 +38,7 @@ import java.util.List;
* @generated
*/
public class IndexItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
-IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/MetaIndexItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/MetaIndexItemProvider.java
index b2b6895..20a9f4d 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/MetaIndexItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/MetaIndexItemProvider.java
@@ -38,7 +38,7 @@ import java.util.List;
* @generated
*/
public class MetaIndexItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
-IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/RepositoryListItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/RepositoryListItemProvider.java
index f431019..e00a3fc 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/RepositoryListItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/RepositoryListItemProvider.java
@@ -40,7 +40,7 @@ import java.util.List;
* @generated
*/
public class RepositoryListItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
-IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletDataItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletDataItemProvider.java
index 06f3826..4fbd367 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletDataItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletDataItemProvider.java
@@ -40,7 +40,7 @@ import java.util.List;
* @generated
*/
public class TargletDataItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
-IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
@@ -104,7 +104,7 @@ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, II
getString("_UI_TargletData_activeRepositoryList_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TargletData_activeRepositoryList_feature",
"_UI_TargletData_type"), SetupPackage.Literals.TARGLET_DATA__ACTIVE_REPOSITORY_LIST, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
@@ -121,7 +121,7 @@ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, II
getString("_UI_TargletData_includeSources_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TargletData_includeSources_feature",
"_UI_TargletData_type"), SetupPackage.Literals.TARGLET_DATA__INCLUDE_SOURCES, true, false, false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}
/**
@@ -138,7 +138,7 @@ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, II
getString("_UI_TargletData_includeAllPlatforms_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TargletData_includeAllPlatforms_feature",
"_UI_TargletData_type"), SetupPackage.Literals.TARGLET_DATA__INCLUDE_ALL_PLATFORMS, true, false, false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletImportTaskItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletImportTaskItemProvider.java
index fce4575..be2e17e 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletImportTaskItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletImportTaskItemProvider.java
@@ -36,7 +36,7 @@ import java.util.List;
*/
@SuppressWarnings("deprecation")
public class TargletImportTaskItemProvider extends SetupTaskItemProvider implements IEditingDomainItemProvider,
-IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
@@ -81,7 +81,7 @@ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, II
getString("_UI_TargletImportTask_targletURI_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TargletImportTask_targletURI_feature",
"_UI_TargletImportTask_type"), SetupPackage.Literals.TARGLET_IMPORT_TASK__TARGLET_URI, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletItemProvider.java
index cfc4406..b797e4e 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletItemProvider.java
@@ -31,7 +31,7 @@ import java.util.List;
* @generated
*/
public class TargletItemProvider extends TargletDataItemProvider implements IEditingDomainItemProvider,
-IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletTaskItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletTaskItemProvider.java
index 1442210..544e825 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletTaskItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/TargletTaskItemProvider.java
@@ -49,7 +49,7 @@ import java.util.List;
* @generated
*/
public class TargletTaskItemProvider extends SetupTaskItemProvider implements IEditingDomainItemProvider,
-IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
@@ -113,7 +113,7 @@ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, II
getString("_UI_TargletData_activeRepositoryList_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TargletData_activeRepositoryList_feature",
"_UI_TargletData_type"), SetupPackage.Literals.TARGLET_DATA__ACTIVE_REPOSITORY_LIST, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
@@ -130,7 +130,7 @@ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, II
getString("_UI_TargletData_includeSources_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TargletData_includeSources_feature",
"_UI_TargletData_type"), SetupPackage.Literals.TARGLET_DATA__INCLUDE_SOURCES, true, false, false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}
/**
@@ -147,7 +147,7 @@ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, II
getString("_UI_TargletData_includeAllPlatforms_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TargletData_includeAllPlatforms_feature",
"_UI_TargletData_type"), SetupPackage.Literals.TARGLET_DATA__INCLUDE_ALL_PLATFORMS, true, false, false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecore b/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecore
index 85b5193..b816611 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecore
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecore
@@ -260,6 +260,7 @@
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="origin"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="remoteURI" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="pushURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="userID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="${git.user.id}"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="checkoutBranch" lowerBound="1"
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.genmodel b/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.genmodel
index 9a4916e..c93cd2f 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.genmodel
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.genmodel
@@ -225,6 +225,7 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//GitCloneTask/remoteURI"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//GitCloneTask/userID"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//GitCloneTask/checkoutBranch"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//GitCloneTask/pushURI"/>
</genClasses>
<genClasses ecoreClass="setup.ecore#//ProjectSetImportTask">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//ProjectSetImportTask/uRL"/>
@@ -290,9 +291,9 @@
<genClasses ecoreClass="setup.ecore#//MylynQueriesTask" labelFeature="#//setup/MylynQueriesTask/repositoryURL">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//MylynQueriesTask/connectorKind"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//MylynQueriesTask/repositoryURL"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference setup.ecore#//MylynQueriesTask/queries"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//MylynQueriesTask/userID"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//MylynQueriesTask/password"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference setup.ecore#//MylynQueriesTask/queries"/>
</genClasses>
<genClasses ecoreClass="setup.ecore#//Query">
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference setup.ecore#//Query/task"/>
@@ -307,9 +308,9 @@
<genClasses ecoreClass="setup.ecore#//MylynBuildsTask" labelFeature="#//setup/MylynBuildsTask/serverURL">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//MylynBuildsTask/connectorKind"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//MylynBuildsTask/serverURL"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference setup.ecore#//MylynBuildsTask/buildPlans"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//MylynBuildsTask/userID"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//MylynBuildsTask/password"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference setup.ecore#//MylynBuildsTask/buildPlans"/>
</genClasses>
<genClasses ecoreClass="setup.ecore#//BuildPlan">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute setup.ecore#//BuildPlan/name"/>
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/internal/setup/AbstractSetupTaskContext.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/internal/setup/AbstractSetupTaskContext.java
index 20ef491..7c4bf50 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/internal/setup/AbstractSetupTaskContext.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/internal/setup/AbstractSetupTaskContext.java
@@ -596,9 +596,24 @@ public abstract class AbstractSetupTaskContext extends HashMap<Object, Object> i
public URI redirect(URI uri)
{
+ if (uri == null)
+ {
+ return null;
+ }
+
return resourceSet.getURIConverter().normalize(uri);
}
+ public String redirect(String uri)
+ {
+ if (StringUtil.isEmpty(uri))
+ {
+ return null;
+ }
+
+ return redirect(URI.createURI(uri)).toString();
+ }
+
public URIConverter getURIConverter()
{
return resourceSet.getURIConverter();
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/GitCloneTask.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/GitCloneTask.java
index 3d74a18..2696b6d 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/GitCloneTask.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/GitCloneTask.java
@@ -21,6 +21,7 @@ package org.eclipse.emf.cdo.releng.setup;
* <li>{@link org.eclipse.emf.cdo.releng.setup.GitCloneTask#getLocation <em>Location</em>}</li>
* <li>{@link org.eclipse.emf.cdo.releng.setup.GitCloneTask#getRemoteName <em>Remote Name</em>}</li>
* <li>{@link org.eclipse.emf.cdo.releng.setup.GitCloneTask#getRemoteURI <em>Remote URI</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.setup.GitCloneTask#getPushURI <em>Push URI</em>}</li>
* <li>{@link org.eclipse.emf.cdo.releng.setup.GitCloneTask#getUserID <em>User ID</em>}</li>
* <li>{@link org.eclipse.emf.cdo.releng.setup.GitCloneTask#getCheckoutBranch <em>Checkout Branch</em>}</li>
* </ul>
@@ -140,6 +141,32 @@ public interface GitCloneTask extends SetupTask
void setCheckoutBranch(String value);
/**
+ * Returns the value of the '<em><b>Push URI</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Push URI</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Push URI</em>' attribute.
+ * @see #setPushURI(String)
+ * @see org.eclipse.emf.cdo.releng.setup.SetupPackage#getGitCloneTask_PushURI()
+ * @model
+ * @generated
+ */
+ String getPushURI();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.setup.GitCloneTask#getPushURI <em>Push URI</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Push URI</em>' attribute.
+ * @see #getPushURI()
+ * @generated
+ */
+ void setPushURI(String value);
+
+ /**
* Returns the value of the '<em><b>User ID</b></em>' attribute.
* The default value is <code>"${git.user.id}"</code>.
* <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupPackage.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupPackage.java
index ab8a10c..3960cc5 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupPackage.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupPackage.java
@@ -2699,13 +2699,22 @@ public interface SetupPackage extends EPackage
int GIT_CLONE_TASK__REMOTE_URI = SETUP_TASK_FEATURE_COUNT + 2;
/**
+ * The feature id for the '<em><b>Push URI</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GIT_CLONE_TASK__PUSH_URI = SETUP_TASK_FEATURE_COUNT + 3;
+
+ /**
* The feature id for the '<em><b>User ID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int GIT_CLONE_TASK__USER_ID = SETUP_TASK_FEATURE_COUNT + 3;
+ int GIT_CLONE_TASK__USER_ID = SETUP_TASK_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Checkout Branch</b></em>' attribute.
@@ -2714,7 +2723,7 @@ public interface SetupPackage extends EPackage
* @generated
* @ordered
*/
- int GIT_CLONE_TASK__CHECKOUT_BRANCH = SETUP_TASK_FEATURE_COUNT + 4;
+ int GIT_CLONE_TASK__CHECKOUT_BRANCH = SETUP_TASK_FEATURE_COUNT + 5;
/**
* The number of structural features of the '<em>Git Clone Task</em>' class.
@@ -2723,7 +2732,7 @@ public interface SetupPackage extends EPackage
* @generated
* @ordered
*/
- int GIT_CLONE_TASK_FEATURE_COUNT = SETUP_TASK_FEATURE_COUNT + 5;
+ int GIT_CLONE_TASK_FEATURE_COUNT = SETUP_TASK_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Requirements</b></em>' reference list.
@@ -4509,6 +4518,17 @@ public interface SetupPackage extends EPackage
EAttribute getGitCloneTask_CheckoutBranch();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.setup.GitCloneTask#getPushURI <em>Push URI</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Push URI</em>'.
+ * @see org.eclipse.emf.cdo.releng.setup.GitCloneTask#getPushURI()
+ * @see #getGitCloneTask()
+ * @generated
+ */
+ EAttribute getGitCloneTask_PushURI();
+
+ /**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.setup.GitCloneTask#getUserID <em>User ID</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -6682,6 +6702,14 @@ public interface SetupPackage extends EPackage
EAttribute GIT_CLONE_TASK__CHECKOUT_BRANCH = eINSTANCE.getGitCloneTask_CheckoutBranch();
/**
+ * The meta object literal for the '<em><b>Push URI</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GIT_CLONE_TASK__PUSH_URI = eINSTANCE.getGitCloneTask_PushURI();
+
+ /**
* The meta object literal for the '<em><b>User ID</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupTaskContext.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupTaskContext.java
index bd5fe0a..c0466be 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupTaskContext.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupTaskContext.java
@@ -64,4 +64,6 @@ public interface SetupTaskContext extends Map<Object, Object>, ProgressLog, Stri
public URIConverter getURIConverter();
public URI redirect(URI uri);
+
+ public String redirect(String uri);
}
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/GitCloneTaskImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/GitCloneTaskImpl.java
index df1ad67..ad16625 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/GitCloneTaskImpl.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/GitCloneTaskImpl.java
@@ -7,6 +7,7 @@
*
* Contributors:
* Eike Stepper - initial API and implementation
+ * Ericsson AB (Julian Enoch) - Bug 429520 - Support additional push URL
*/
package org.eclipse.emf.cdo.releng.setup.impl;
@@ -73,6 +74,7 @@ import java.util.Set;
* <li>{@link org.eclipse.emf.cdo.releng.setup.impl.GitCloneTaskImpl#getLocation <em>Location</em>}</li>
* <li>{@link org.eclipse.emf.cdo.releng.setup.impl.GitCloneTaskImpl#getRemoteName <em>Remote Name</em>}</li>
* <li>{@link org.eclipse.emf.cdo.releng.setup.impl.GitCloneTaskImpl#getRemoteURI <em>Remote URI</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.setup.impl.GitCloneTaskImpl#getPushURI <em>Push URI</em>}</li>
* <li>{@link org.eclipse.emf.cdo.releng.setup.impl.GitCloneTaskImpl#getUserID <em>User ID</em>}</li>
* <li>{@link org.eclipse.emf.cdo.releng.setup.impl.GitCloneTaskImpl#getCheckoutBranch <em>Checkout Branch</em>}</li>
* </ul>
@@ -143,6 +145,26 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
protected String remoteURI = REMOTE_URI_EDEFAULT;
/**
+ * The default value of the '{@link #getPushURI() <em>Push URI</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPushURI()
+ * @generated
+ * @ordered
+ */
+ protected static final String PUSH_URI_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPushURI() <em>Push URI</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPushURI()
+ * @generated
+ * @ordered
+ */
+ protected String pushURI = PUSH_URI_EDEFAULT;
+
+ /**
* The default value of the '{@link #getUserID() <em>User ID</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -314,6 +336,31 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
* <!-- end-user-doc -->
* @generated
*/
+ public String getPushURI()
+ {
+ return pushURI;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPushURI(String newPushURI)
+ {
+ String oldPushURI = pushURI;
+ pushURI = newPushURI;
+ if (eNotificationRequired())
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.GIT_CLONE_TASK__PUSH_URI, oldPushURI, pushURI));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public String getUserID()
{
return userID;
@@ -350,6 +397,8 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
return getRemoteName();
case SetupPackage.GIT_CLONE_TASK__REMOTE_URI:
return getRemoteURI();
+ case SetupPackage.GIT_CLONE_TASK__PUSH_URI:
+ return getPushURI();
case SetupPackage.GIT_CLONE_TASK__USER_ID:
return getUserID();
case SetupPackage.GIT_CLONE_TASK__CHECKOUT_BRANCH:
@@ -377,6 +426,9 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
case SetupPackage.GIT_CLONE_TASK__REMOTE_URI:
setRemoteURI((String)newValue);
return;
+ case SetupPackage.GIT_CLONE_TASK__PUSH_URI:
+ setPushURI((String)newValue);
+ return;
case SetupPackage.GIT_CLONE_TASK__USER_ID:
setUserID((String)newValue);
return;
@@ -406,6 +458,9 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
case SetupPackage.GIT_CLONE_TASK__REMOTE_URI:
setRemoteURI(REMOTE_URI_EDEFAULT);
return;
+ case SetupPackage.GIT_CLONE_TASK__PUSH_URI:
+ setPushURI(PUSH_URI_EDEFAULT);
+ return;
case SetupPackage.GIT_CLONE_TASK__USER_ID:
setUserID(USER_ID_EDEFAULT);
return;
@@ -432,11 +487,13 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
return REMOTE_NAME_EDEFAULT == null ? remoteName != null : !REMOTE_NAME_EDEFAULT.equals(remoteName);
case SetupPackage.GIT_CLONE_TASK__REMOTE_URI:
return REMOTE_URI_EDEFAULT == null ? remoteURI != null : !REMOTE_URI_EDEFAULT.equals(remoteURI);
+ case SetupPackage.GIT_CLONE_TASK__PUSH_URI:
+ return PUSH_URI_EDEFAULT == null ? pushURI != null : !PUSH_URI_EDEFAULT.equals(pushURI);
case SetupPackage.GIT_CLONE_TASK__USER_ID:
return USER_ID_EDEFAULT == null ? userID != null : !USER_ID_EDEFAULT.equals(userID);
case SetupPackage.GIT_CLONE_TASK__CHECKOUT_BRANCH:
return CHECKOUT_BRANCH_EDEFAULT == null ? checkoutBranch != null : !CHECKOUT_BRANCH_EDEFAULT
- .equals(checkoutBranch);
+ .equals(checkoutBranch);
}
return super.eIsSet(featureID);
}
@@ -461,6 +518,8 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
result.append(remoteName);
result.append(", remoteURI: ");
result.append(remoteURI);
+ result.append(", pushURI: ");
+ result.append(pushURI);
result.append(", userID: ");
result.append(userID);
result.append(", checkoutBranch: ");
@@ -478,15 +537,14 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
public boolean isNeeded(SetupTaskContext context) throws Exception
{
gitDelegate = GitUtil.create();
- return gitDelegate.isNeeded(context, getLocation(), getCheckoutBranch(), getRemoteName());
+ return gitDelegate.isNeeded(context, this);
}
public void perform(SetupTaskContext context) throws Exception
{
if (gitDelegate != null)
{
- String remoteURI = context.redirect(URI.createURI(getRemoteURI())).toString();
- gitDelegate.perform(context, getCheckoutBranch(), getRemoteName(), remoteURI, getUserID());
+ gitDelegate.perform(context, this);
}
}
@@ -503,7 +561,7 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
@Override
public MirrorRunnable mirror(final MirrorContext context, File mirrorsDir, boolean includingLocals) throws Exception
{
- String sourceURL = context.redirect(URI.createURI(getRemoteURI())).toString();
+ String sourceURL = context.redirect(getRemoteURI());
final File local = new File(mirrorsDir, FileUtil.encodeFileName(sourceURL));
String localURL = URI.createFileURI(local.getAbsolutePath()).toString();
@@ -538,11 +596,9 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
*/
private interface GitDelegate
{
- public boolean isNeeded(SetupTaskContext context, String name, String checkoutBranch, String remoteName)
- throws Exception;
+ public boolean isNeeded(SetupTaskContext context, GitCloneTaskImpl impl) throws Exception;
- public void perform(SetupTaskContext context, String checkoutBranch, String remoteName, String remoteURI,
- String userID) throws Exception;
+ public void perform(SetupTaskContext context, GitCloneTaskImpl impl) throws Exception;
public void dispose();
}
@@ -567,9 +623,10 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
return new GitUtil();
}
- public boolean isNeeded(SetupTaskContext context, String location, String checkoutBranch, String remoteName)
- throws Exception
+ public boolean isNeeded(SetupTaskContext context, GitCloneTaskImpl impl) throws Exception
{
+ String location = impl.getLocation();
+
workDir = new File(location);
if (!workDir.isDirectory())
{
@@ -595,7 +652,11 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
}
Repository repository = git.getRepository();
- GitUtil.configureRepository(context, repository, checkoutBranch, remoteName);
+ String checkoutBranch = impl.getCheckoutBranch();
+ String remoteName = impl.getRemoteName();
+ String pushURI = context.redirect(impl.getPushURI());
+ String userID = impl.getUserID();
+ GitUtil.configureRepository(context, repository, checkoutBranch, remoteName, pushURI, userID);
hasCheckout = repository.getAllRefs().containsKey("refs/heads/" + checkoutBranch);
if (!hasCheckout)
@@ -618,18 +679,24 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
}
}
- public void perform(SetupTaskContext context, String checkoutBranch, String remoteName, String remoteURI,
- String userID) throws Exception
+ public void perform(SetupTaskContext context, GitCloneTaskImpl impl) throws Exception
{
try
{
+ String checkoutBranch = impl.getCheckoutBranch();
+ String remoteName = impl.getRemoteName();
+ String remoteURI = context.redirect(impl.getRemoteURI());
+ String userID = impl.getUserID();
+
if (cachedGit == null)
{
cachedGit = GitUtil.cloneRepository(context, workDir, checkoutBranch, remoteName, remoteURI, userID);
cachedRepository = cachedGit.getRepository();
+
if (!URI.createURI(remoteURI).isFile())
{
- GitUtil.configureRepository(context, cachedRepository, checkoutBranch, remoteName);
+ String pushURI = context.redirect(impl.getPushURI());
+ GitUtil.configureRepository(context, cachedRepository, checkoutBranch, remoteName, pushURI, userID);
}
}
@@ -724,13 +791,14 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
}
private static void configureRepository(SetupTaskContext context, Repository repository, String checkoutBranch,
- String remoteName) throws Exception, IOException
+ String remoteName, String pushURI, String userID) throws Exception, IOException
{
StoredConfig config = repository.getConfig();
boolean changed = false;
changed |= configureLineEndingConversion(context, config);
changed |= addPushRefSpec(context, config, checkoutBranch, remoteName);
+ changed |= addPushURI(context, config, remoteName, pushURI, userID);
if (changed)
{
config.save();
@@ -784,6 +852,46 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
return false;
}
+ private static boolean addPushURI(SetupTaskContext context, StoredConfig config, String remoteName, String pushURI,
+ String userID) throws Exception
+ {
+ boolean uriAdded = false;
+
+ if (!StringUtil.isEmpty(pushURI))
+ {
+ String remote;
+ URI baseURI = URI.createURI(pushURI);
+ if (baseURI.isFile())
+ {
+ remote = baseURI.toString();
+ }
+ else
+ {
+ remote = URI.createHierarchicalURI(baseURI.scheme(), userID + "@" + baseURI.authority(), baseURI.device(),
+ baseURI.segments(), baseURI.query(), baseURI.fragment()).toString();
+ }
+
+ URIish uri = new URIish(remote);
+ for (RemoteConfig remoteConfig : RemoteConfig.getAllRemoteConfigs(config))
+ {
+ if (remoteName.equals(remoteConfig.getName()))
+ {
+ if (context.isPerforming())
+ {
+ context.log("Adding push URI: " + remote);
+ }
+ uriAdded = remoteConfig.addPushURI(uri);
+ if (uriAdded)
+ {
+ remoteConfig.update(config);
+ }
+ break;
+ }
+ }
+ }
+ return uriAdded;
+ }
+
private static boolean hasGerritPushRefSpec(List<RefSpec> pushRefSpecs, String gerritQueue)
{
for (RefSpec refSpec : pushRefSpecs)
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/MaterializationTaskImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/MaterializationTaskImpl.java
index 8a39ce7..f894e3e 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/MaterializationTaskImpl.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/MaterializationTaskImpl.java
@@ -977,7 +977,7 @@ public class MaterializationTaskImpl extends BasicMaterializationTaskImpl implem
EList<Provider> p2Providers = p2SearchPath.getProviders();
for (P2Repository p2Repository : p2Repositories)
{
- String url = context.redirect(URI.createURI(p2Repository.getURL())).toString();
+ String url = context.redirect(p2Repository.getURL());
Provider provider = RmapFactory.eINSTANCE.createProvider();
provider.setComponentTypesAttr("eclipse.feature,osgi.bundle");
provider.setReaderType("p2");
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/P2TaskImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/P2TaskImpl.java
index 99ebb46..784b90d 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/P2TaskImpl.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/P2TaskImpl.java
@@ -562,7 +562,7 @@ public class P2TaskImpl extends SetupTaskImpl implements P2Task
Set<String> knownRepositories = getKnownRepositories();
for (P2Repository p2Repository : getP2Repositories())
{
- String url = context.redirect(URI.createURI(p2Repository.getURL())).toString();
+ String url = context.redirect(p2Repository.getURL());
if (!knownRepositories.contains(url))
{
return true;
@@ -602,7 +602,7 @@ public class P2TaskImpl extends SetupTaskImpl implements P2Task
List<java.net.URI> repos = new ArrayList<java.net.URI>();
for (P2Repository p2Repository : getP2Repositories())
{
- String url = context.redirect(URI.createURI(p2Repository.getURL())).toString();
+ String url = context.redirect(p2Repository.getURL());
java.net.URI uri = new java.net.URI(url);
context.log("Using repository " + uri);
if (neededInstallableUnits == null)
@@ -1378,7 +1378,7 @@ public class P2TaskImpl extends SetupTaskImpl implements P2Task
String value = (String)object.eGet(attribute);
if (attribute == SetupPackage.Literals.P2_REPOSITORY__URL)
{
- value = context.redirect(URI.createURI(value)).toString();
+ value = context.redirect(value);
}
builder.append(value);
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupPackageImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupPackageImpl.java
index 7a986b3..5cf7124 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupPackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupPackageImpl.java
@@ -945,7 +945,7 @@ public class SetupPackageImpl extends EPackageImpl implements SetupPackage
*/
public EAttribute getGitCloneTask_CheckoutBranch()
{
- return (EAttribute)gitCloneTaskEClass.getEStructuralFeatures().get(4);
+ return (EAttribute)gitCloneTaskEClass.getEStructuralFeatures().get(5);
}
/**
@@ -953,7 +953,7 @@ public class SetupPackageImpl extends EPackageImpl implements SetupPackage
* <!-- end-user-doc -->
* @generated
*/
- public EAttribute getGitCloneTask_UserID()
+ public EAttribute getGitCloneTask_PushURI()
{
return (EAttribute)gitCloneTaskEClass.getEStructuralFeatures().get(3);
}
@@ -963,6 +963,16 @@ public class SetupPackageImpl extends EPackageImpl implements SetupPackage
* <!-- end-user-doc -->
* @generated
*/
+ public EAttribute getGitCloneTask_UserID()
+ {
+ return (EAttribute)gitCloneTaskEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getProjectSetImportTask()
{
return projectSetImportTaskEClass;
@@ -2900,6 +2910,7 @@ public class SetupPackageImpl extends EPackageImpl implements SetupPackage
createEAttribute(gitCloneTaskEClass, GIT_CLONE_TASK__LOCATION);
createEAttribute(gitCloneTaskEClass, GIT_CLONE_TASK__REMOTE_NAME);
createEAttribute(gitCloneTaskEClass, GIT_CLONE_TASK__REMOTE_URI);
+ createEAttribute(gitCloneTaskEClass, GIT_CLONE_TASK__PUSH_URI);
createEAttribute(gitCloneTaskEClass, GIT_CLONE_TASK__USER_ID);
createEAttribute(gitCloneTaskEClass, GIT_CLONE_TASK__CHECKOUT_BRANCH);
@@ -3435,6 +3446,8 @@ public class SetupPackageImpl extends EPackageImpl implements SetupPackage
IS_ORDERED);
initEAttribute(getGitCloneTask_RemoteURI(), ecorePackage.getEString(), "remoteURI", null, 1, 1, GitCloneTask.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGitCloneTask_PushURI(), ecorePackage.getEString(), "pushURI", null, 0, 1, GitCloneTask.class,
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getGitCloneTask_UserID(), ecorePackage.getEString(), "userID", "${git.user.id}", 0, 1,
GitCloneTask.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
IS_ORDERED);