PicketLink Product Branching

In project PicketLink, we have an innovative upstream project branch that has lots of changes happening at a rapid pace.

 

There is a product branch that gets the stable version of PicketLink.

 

The product branch is located at:  https://svn.jboss.org/repos/picketlink/product/trunk/

 

 

Each time, you checkin changes to the project branches, you may want to sync the product branch.

Example:

 

Checking In Project Changes:-

 

I checked in few changes to the project branch.  I can see in the email as follows.

 

 

Date: 2011-07-19 10:03:50 -0400 (Tue, 19 Jul 2011)
New Revision: 1096

Modified:
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/SAMLEntitiesDescriptorParser.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/SAMLEntityDescriptorParser.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLMetadataWriter.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ExtensionsType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RoleDescriptorType.java
Log:
PLFED-115: saml md parsing/writing

 

 

Now I will have to track the

  • file names
  • Revision Number.  (1096)

 

 

Merging into Product Branch :-

Lets merge the changes back into the product branch as follows.

 

 

anil@localhost:~/picketlink/picketlink/product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/saml/v2/metadata$ svn info ExtensionsType.java 
Path: ExtensionsType.java
Name: ExtensionsType.java
URL: https://svn.jboss.org/repos/picketlink/product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ExtensionsType.java
Repository Root: https://svn.jboss.org/repos/picketlink
Repository UUID: cbddccc4-e45a-42eb-be77-0d76e4b45d38
Revision: 1094
Node Kind: file
Schedule: normal
Last Changed Author: anil.saldhana@xxxxx
Last Changed Rev: 1094
Last Changed Date: 2011-07-18 17:04:21 -0500 (Mon, 18 Jul 2011)
Text Last Updated: 2011-06-21 15:50:57 -0500 (Tue, 21 Jun 2011)
Checksum: 2eed5f3f41de669eaa2f1e5fcc6c6250

anil@localhost:~/picketlink/picketlink/product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/saml/v2/metadata$ svn merge -r1094:1096 https://svn.jboss.org/repos/picketlink/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ExtensionsType.java
Authentication realm: <https://svn.jboss.org:443> picketlink project 
--- Merging r1095 through r1096 into 'ExtensionsType.java':
U    ExtensionsType.java
anil@localhost:~/picketlink/picketlink/product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/saml/v2/metadata$ svn diff ExtensionsType.java 
Index: ExtensionsType.java
===================================================================
--- ExtensionsType.java (revision 1094)
+++ ExtensionsType.java (working copy)
@@ -21,10 +21,6 @@
  */
 package org.picketlink.identity.federation.saml.v2.metadata;

-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
 import org.w3c.dom.Element;

 /**
@@ -48,37 +44,15 @@
  */
 public class ExtensionsType
 {
-   protected List<Object> any = new ArrayList<Object>();
+   protected Element element = null;

-   /**
-    * Add an object
-    * @param obj
-    */
-   public void addObject(Object obj)
+   public Element getElement()
    {
-      this.any.add(obj);
+      return element;
    }

-   /**
-    * Remove an object
-    * @param obj
-    */
-   public void removeObject(Object obj)
+   public void setElement(Element element)
    {
-      this.any.remove(obj);
+      this.element = element;
    }
-
-   /**
-    * Gets the value of the any property.
-    * <p>
-    * Objects of the following type(s) are allowed in the list
-    * {@link Element }
-    * {@link Object }
-    * 
-    * 
-    */
-   public List<Object> getAny()
-   {
-      return Collections.unmodifiableList(this.any);
-   }
 }
\ No newline at end of file

Property changes on: ExtensionsType.java
___________________________________________________________________
Added: svn:mergeinfo
   Merged /federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ExtensionsType.java:r1095-1096

anil@localhost:~/picketlink/picketlink/product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/saml/v2/metadata$ svn merge -r1094:1096 https://svn.jboss.org/repos/picketlink/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RoleDescriptorType.java
Authentication realm: <https://svn.jboss.org:443> picketlink project 
--- Merging r1095 through r1096 into 'RoleDescriptorType.java':
U    RoleDescriptorType.java
anil@localhost:~/picketlink/picketlink/product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/saml/v2/metadata$

 

If a particular directory has changes to multiple files, we can merge at the directory level as follows:

 

anil@localhost:~/picketlink/picketlink/product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata$ svn merge -r1094:1096 https://svn.jboss.org/repos/picketlink/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/
Authentication realm: <https://svn.jboss.org:443> picketlink project 
--- Merging r1095 through r1096 into '.':
U    SAMLEntityDescriptorParser.java
U    SAMLEntitiesDescriptorParser.java

 

As you can see, since the structure of the Product branch is different from the Project branches, it is important to merge the changes into individual files or directories.  Since the product branch is supposed to get infrequent changes, this strategy works.

 

One more example, of a merge of changes from the project branch into the product branch.  We bring in multiple changes to directories.

 

anil@localhost:~/picketlink/picketlink/product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation$ svn merge -r1151:1154 https://svn.jboss.org/repos/picketlink/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/
Authentication realm: <https://svn.jboss.org:443> picketlink project
Password for 'anil.saldhana@jboss.com': 
--- Merging r1152 through r1154 into '.':
U    core/factories/SecurityActions.java
U    core/parsers/AbstractParser.java
U    core/parsers/wsse/WSSecurityParser.java
U    core/parsers/config/SAMLConfigParser.java
U    core/parsers/sts/STSConfigParser.java
U    core/parsers/wsp/WSPolicyParser.java
U    core/parsers/wsa/WSAddressingParser.java
--- Merging r1152 through r1154 into 'core/parsers/saml/metadata/SAMLEntityDescriptorParser.java':
U    core/parsers/saml/metadata/SAMLEntityDescriptorParser.java
--- Merging r1152 through r1154 into 'core/parsers/saml/metadata':
U    core/parsers/saml/metadata/SAMLEntitiesDescriptorParser.java
--- Merging r1152 through r1154 into '.':
U    core/parsers/saml/SAMLSloRequestParser.java
U    core/parsers/saml/SAMLAssertionParser.java
U    core/parsers/saml/SAML11AssertionParser.java
U    core/parsers/saml/SAMLConditionsParser.java
U    core/parsers/saml/SAMLArtifactResponseParser.java
U    core/parsers/saml/SAMLRequestAbstractParser.java
U    core/parsers/saml/SAMLParser.java
U    core/parsers/saml/SAMLAuthNRequestParser.java
U    core/parsers/saml/SAMLAttributeQueryParser.java
U    core/parsers/saml/xacml/SAMLXACMLRequestParser.java
U    core/parsers/saml/SAML11RequestParser.java
U    core/parsers/saml/SAMLArtifactResolveParser.java
U    core/parsers/saml/SAMLResponseParser.java
U    core/parsers/saml/SAMLSubjectParser.java
U    core/parsers/saml/SAML11ResponseParser.java
U    core/parsers/saml/SAML11SubjectParser.java
U    core/parsers/saml/SAMLStatusResponseTypeParser.java
--- Merging r1152 through r1154 into 'core/parsers/util/SAMLParserUtil.java':
U    core/parsers/util/SAMLParserUtil.java
--- Merging r1152 through r1154 into '.':
U    core/parsers/util/SAML11ParserUtil.java
U    core/parsers/util/StaxParserUtil.java
U    core/parsers/wst/WSTRenewTargetParser.java
U    core/parsers/wst/WSTCancelTargetParser.java
U    core/parsers/wst/WSTrustParser.java
U    core/parsers/wst/WSTRequestSecurityTokenResponseParser.java
U    core/parsers/wst/WSTValidateTargetParser.java
U    core/parsers/wst/WSTRequestSecurityTokenParser.java
U    core/parsers/wst/WSTrustOnBehalfOfParser.java
U    core/pdp/SOAPSAMLXACMLPDP.java
Skipped 'core/ErrorCodes.java'
--- Merging r1152 through r1154 into 'core/wstrust/plugins/saml':
U    core/wstrust/plugins/saml/SAML11TokenProvider.java
U    core/wstrust/plugins/saml/SAML20TokenProvider.java
--- Merging r1152 through r1154 into '.':
U    core/wstrust/WSTrustServiceFactory.java
U    core/wstrust/StandardRequestHandler.java
U    core/wstrust/STSClient.java
U    core/wstrust/writers/WSTrustRSTWriter.java
U    core/wstrust/writers/WSTrustRequestWriter.java
U    core/wstrust/writers/WSTrustResponseWriter.java
U    core/wstrust/writers/WSSecurityWriter.java
U    core/wstrust/PicketLinkSTSConfiguration.java
U    core/wstrust/handlers/STSSecurityHandler.java
U    core/wstrust/auth/STSValidatingLoginModule.java
U    core/wstrust/auth/AbstractSTSLoginModule.java
U    core/wstrust/wrappers/RequestSecurityToken.java
U    core/wstrust/wrappers/Lifetime.java
U    core/wstrust/SamlCredential.java
U    core/wstrust/PicketLinkSTS.java
U    core/wstrust/WSTrustConstants.java
U    core/wstrust/WSTrustUtil.java
U    core/wstrust/STSClientConfig.java
U    core/saml/md/providers/MetaDataBuilderDelegate.java
U    core/saml/md/providers/FileBasedEntityMetadataProvider.java
--- Merging r1152 through r1154 into 'core/saml/v1/writers/SAML11AssertionWriter.java':
U    core/saml/v1/writers/SAML11AssertionWriter.java
--- Merging r1152 through r1154 into '.':
U    core/saml/v1/writers/SAML11RequestWriter.java
....

 

Verification of Merged Changes :-

 

 

anil@localhost:~/picketlink/picketlink/product/trunk$ svn stat 
 M      picketlink-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata
M       picketlink-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/SAMLEntityDescriptorParser.java
M       picketlink-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/SAMLEntitiesDescriptorParser.java
MM      picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLMetadataWriter.java
MM      picketlink-core/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ExtensionsType.java
MM      picketlink-core/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RoleDescriptorType.java

 

As you can see the changes match the project branch changes.

 

We are ready to check in.

 

Check in the merged changes into the product branch :-

 

 

anil@localhost:~/picketlink/picketlink/product/trunk$ svn ci -m "PLFED-115: saml md parsing/writing:: Merge from project branch:: Revision 1096"
Authentication realm: <https://svn.jboss.org:443> picketlink project 
Sending        trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata
Sending        trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/SAMLEntitiesDescriptorParser.java
Sending        trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/SAMLEntityDescriptorParser.java
Sending        trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLMetadataWriter.java
Sending        trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ExtensionsType.java
Sending        trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RoleDescriptorType.java
Transmitting file data .....
Committed revision 1097.