hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1521435 - in /httpcomponents/project-release-tools/trunk: build.gradle buildSrc/src/main/groovy/Svn.groovy
Date Tue, 10 Sep 2013 11:27:30 GMT
Author: olegk
Date: Tue Sep 10 11:27:30 2013
New Revision: 1521435

URL: http://svn.apache.org/r1521435
Log:
Revert local snapshot prior to choosing a new release version

Modified:
    httpcomponents/project-release-tools/trunk/build.gradle
    httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Svn.groovy

Modified: httpcomponents/project-release-tools/trunk/build.gradle
URL: http://svn.apache.org/viewvc/httpcomponents/project-release-tools/trunk/build.gradle?rev=1521435&r1=1521434&r2=1521435&view=diff
==============================================================================
--- httpcomponents/project-release-tools/trunk/build.gradle (original)
+++ httpcomponents/project-release-tools/trunk/build.gradle Tue Sep 10 11:27:30 2013
@@ -105,6 +105,8 @@ if (devRepo) {
             releaseVer = s
         }
 
+        Svn.revert(checkoutSnapshot.localDir)
+
         releaseTag = Release.rewriteAsReleaseTag(devRepo, releaseVer)
         Release.rewritePom(checkoutSnapshot.localDir, releaseVer, releaseTag)
 

Modified: httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Svn.groovy
URL: http://svn.apache.org/viewvc/httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Svn.groovy?rev=1521435&r1=1521434&r2=1521435&view=diff
==============================================================================
--- httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Svn.groovy (original)
+++ httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Svn.groovy Tue Sep
10 11:27:30 2013
@@ -44,6 +44,7 @@ import org.tmatesoft.svn.core.wc2.SvnCop
 import org.tmatesoft.svn.core.wc2.SvnGetStatus
 import org.tmatesoft.svn.core.wc2.SvnOperationFactory
 import org.tmatesoft.svn.core.wc2.SvnRemoteCopy
+import org.tmatesoft.svn.core.wc2.SvnRevert
 import org.tmatesoft.svn.core.wc2.SvnScheduleForAddition
 import org.tmatesoft.svn.core.wc2.SvnStatus
 import org.tmatesoft.svn.core.wc2.SvnTarget
@@ -121,6 +122,21 @@ class Svn {
         }
     }
 
+    static void revert(File dir) {
+        SVNCommandEnvironment env = getSVNCommandEnvironment()
+        SvnOperationFactory opfactory = createOperationFactory(env)
+        try {
+            SvnRevert revertOp = opfactory.createRevert()
+            revertOp.setSingleTarget(SvnTarget.fromFile(dir))
+            revertOp.setDepth(SVNDepth.INFINITY)
+            revertOp.setPreserveModifiedCopies(false)
+            revertOp.setRevertMissingDirectories(true)
+            revertOp.run()
+        } finally {
+            opfactory.dispose()
+        }
+    }
+
     static void scheduleForAddition(File dir) {
         SVNCommandEnvironment env = getSVNCommandEnvironment()
         SvnOperationFactory opfactory = createOperationFactory(env)



Mime
View raw message