hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1548935 - /httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy
Date Sat, 07 Dec 2013 15:58:59 GMT
Author: olegk
Date: Sat Dec  7 15:58:59 2013
New Revision: 1548935

URL: http://svn.apache.org/r1548935
Log:
Fixed truncated branch path

Modified:
    httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy

Modified: httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy?rev=1548935&r1=1548934&r2=1548935&view=diff
==============================================================================
--- httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy (original)
+++ httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy Sat Dec  7 15:58:59
2013
@@ -29,8 +29,10 @@ import org.tmatesoft.svn.core.io.SVNRepo
 
 class HC {
 
-    static void createAndroidBranch(String coreVersion, String clientVersion) {
-        SVNRepository hcRepo = Svn.getRepository(new URI('https://svn.apache.org/repos/asf/httpcomponents/'))
+    static String REPO_ROOT = 'https://svn.apache.org/repos/asf/httpcomponents/'
+
+    static void createAndroidBranch(String coreVersion, String clientVersion, String branchName)
{
+        SVNRepository hcRepo = Svn.getRepository(new URI(REPO_ROOT))
 
         try {
             ISVNEditor commitEditor = hcRepo.getCommitEditor(
@@ -39,9 +41,13 @@ class HC {
             commitEditor.openDir(
                     'httpclient-android/branches', -1)
             commitEditor.addDir(
-                    'httpclient-android/branches/test-branch/src/main', null, -1)
+                    "httpclient-android/branches/${branchName}", null, -1)
+            commitEditor.addDir(
+                    "httpclient-android/branches/${branchName}/src", null, -1)
+            commitEditor.addDir(
+                    "httpclient-android/branches/${branchName}/src/main", null, -1)
             commitEditor.addDir(
-                    "httpclient-android/branches/test-branch/src/main/java",
+                    "httpclient-android/branches/${branchName}/src/main/java",
                     "httpcore/tags/${coreVersion}/httpcore/src/main/java/", -1)
 
             List<String> modules = [
@@ -51,13 +57,15 @@ class HC {
                     'client', 'impl/execchain', 'impl/client']
             modules.each { String module ->
                 commitEditor.addDir(
-                        "httpclient-android/branches/test-branch/src/main/java/org/apache/http/${module}",
+                        "httpclient-android/branches/${branchName}/src/main/java/org/apache/http/${module}",
                         "httpclient/tags/${clientVersion}/httpclient/src/main/java/org/apache/http/${module}",
-1)
                 commitEditor.closeDir()
             }
             commitEditor.closeDir()
             commitEditor.closeDir()
             commitEditor.closeDir()
+            commitEditor.closeDir()
+            commitEditor.closeDir()
             commitEditor.closeEdit()
 
         } finally {
@@ -66,7 +74,16 @@ class HC {
     }
 
     static void main(String[] args) {
-        createAndroidBranch('4.3', '4.3.1')
+        String branchName = 'test-branch'
+
+        createAndroidBranch('4.3', '4.3.1', branchName)
+
+        File tmpDir = new File("build/${branchName}")
+        if (!tmpDir.exists()) {
+            tmpDir.mkdirs()
+        }
+
+        Svn.checkout(new URI("${REPO_ROOT}httpclient-android/branches/${branchName}"), tmpDir)
     }
 
 }



Mime
View raw message