ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-456: do not delete patch file after
Date Wed, 27 May 2015 13:01:53 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-456 540a4b298 -> 825225600


# ignite-456: do not delete patch file after


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/82522560
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/82522560
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/82522560

Branch: refs/heads/ignite-456
Commit: 825225600b5233f2abe922038d852afba3eb093b
Parents: 540a4b2
Author: null <null>
Authored: Wed May 27 16:01:50 2015 +0300
Committer: null <null>
Committed: Wed May 27 16:01:50 2015 +0300

----------------------------------------------------------------------
 dev-tools/src/main/groovy/jiraslurp.groovy | 52 ++++++++++++-------------
 1 file changed, 25 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82522560/dev-tools/src/main/groovy/jiraslurp.groovy
----------------------------------------------------------------------
diff --git a/dev-tools/src/main/groovy/jiraslurp.groovy b/dev-tools/src/main/groovy/jiraslurp.groovy
index 4d746f0..e5b0efc 100644
--- a/dev-tools/src/main/groovy/jiraslurp.groovy
+++ b/dev-tools/src/main/groovy/jiraslurp.groovy
@@ -288,46 +288,44 @@ def applyPatch = { jira, attachementURL ->
 
     def patchFile = new File("${jira}-${attachementURL}.patch")
 
-    try {
-        println "Getting patch content."
+    if (patchFile.exists())
+        patchFile.delete()
 
-        patchFile << new URL("$ATTACHMENT_URL/$attachementURL/").text
+    println "Getting patch content."
 
-        println "Got patch content."
+    patchFile << new URL("$ATTACHMENT_URL/$attachementURL/").text
 
-        try {
-            tryGitAmAbort()
+    println "Got patch content."
 
-            execGit "git branch"
+    try {
+        tryGitAmAbort()
 
-            execGit "git config user.email \"$userEmail\""
-            execGit "git config user.name \"$userName\""
+        execGit "git branch"
 
-            // Create a new uniqueue branch to applying patch
-            def newTestBranch = "test-branch-${jira}-${attachementURL}-${System.currentTimeMillis()}"
-            execGit "git checkout -b ${newTestBranch}"
+        execGit "git config user.email \"$userEmail\""
+        execGit "git config user.name \"$userName\""
 
-            execGit "git branch"
+        // Create a new uniqueue branch to applying patch
+        def newTestBranch = "test-branch-${jira}-${attachementURL}-${System.currentTimeMillis()}"
+        execGit "git checkout -b ${newTestBranch}"
 
-            println "Trying to apply patch."
+        execGit "git branch"
 
-            execGit "git am dev-tools/${patchFile.name}"
+        println "Trying to apply patch."
 
-            println "Patch was applied successfully."
-        }
-        catch (Throwable e) {
-            println "Patch was not applied successfully. Patch content:"
-            println patchFile.text
+        execGit "git am dev-tools/${patchFile.name}"
 
-            println "Aborting patch applying."
+        println "Patch was applied successfully."
+    }
+    catch (Throwable e) {
+        println "Patch was not applied successfully. Patch content:"
+        println patchFile.text
 
-            tryGitAmAbort()
+        println "Aborting patch applying."
 
-            throw e;
-        }
-    }
-    finally {
-//        assert patchFile.delete(), 'Could not delete patch file.'
+        tryGitAmAbort()
+
+        throw e;
     }
 }
 


Mime
View raw message