Thursday, March 19, 2009

svn merge a particular revision

Assuming that you have committed a few changes to trunk and want to merge the same to a branch, you can use the "merge -c xyz" pattern as follows:

Let us say that the revision that I committed my changes on the trunk was "86077". I do a dry run to check what changes will get merged if I do the real thing.

============================
anil@localhost:~/Branch_5_x$ svn merge -c 86077 https://svn.jboss.org/repos/jbossas/trunk/ --dry-run
U component-matrix/pom.xml
U server/src/main/org/jboss/deployment/security/AbstractSecurityDeployer.java
U server/src/main/org/jboss/deployment/security/EjbPolicyConfigurationFacade.java
U server/src/main/org/jboss/web/deployers/WarSecurityDeployer.java
A server/src/main/org/jboss/web/deployers/SecurityActions.java
U server/src/etc/deployers/security-deployer-jboss-beans.xml
A testsuite/src/resources/web/xacml/requestAttrib/WEB-INF/jbossxacml-config.xml
A testsuite/src/resources/security/authorization/xacml-ejb/META-INF/jbossxacml-config.xml
U testsuite/imports/sections/security.xml
U testsuite/imports/sections/web.xml
U security/.classpath
A security/src/main/org/jboss/security/deployers
A security/src/main/org/jboss/security/deployers/XacmlConfigParsingDeployer.java
A security/src/main/org/jboss/security/deployers/JAXBElementParsingDeployer.java
A security/src/main/org/jboss/security/deployers/AclConfigParsingDeployer.java
U security/pom.xml
===============================

Ok. Those are the changes I want it into my branch. Now I do the real merge without the "--dry-run" option.

======================================
anil@localhost:~/Branch_5_x$ svn merge -c 86077 https://svn.jboss.org/repos/jbossas/trunk/
U component-matrix/pom.xml
U server/src/main/org/jboss/deployment/security/AbstractSecurityDeployer.java
U server/src/main/org/jboss/deployment/security/EjbPolicyConfigurationFacade.java
U server/src/main/org/jboss/web/deployers/WarSecurityDeployer.java
A server/src/main/org/jboss/web/deployers/SecurityActions.java
U server/src/etc/deployers/security-deployer-jboss-beans.xml
A testsuite/src/resources/web/xacml/requestAttrib/WEB-INF/jbossxacml-config.xml
A testsuite/src/resources/security/authorization/xacml-ejb/META-INF/jbossxacml-config.xml
U testsuite/imports/sections/security.xml
U testsuite/imports/sections/web.xml
U security/.classpath
A security/src/main/org/jboss/security/deployers
A security/src/main/org/jboss/security/deployers/XacmlConfigParsingDeployer.java
A security/src/main/org/jboss/security/deployers/JAXBElementParsingDeployer.java
A security/src/main/org/jboss/security/deployers/AclConfigParsingDeployer.java
U security/pom.xml
anil@localhost:~/Branch_5_x$
=============================

No comments: