You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/05/25 17:06:21 UTC

incubator-ignite git commit: ignite-456: logging

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-456 [created] 0a92d3942


ignite-456: logging


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

Branch: refs/heads/ignite-456
Commit: 0a92d39425e8e9b958ea4aa1c2fca9583ec61faa
Parents: edf6ffc
Author: null <null>
Authored: Mon May 25 18:05:39 2015 +0300
Committer: null <null>
Committed: Mon May 25 18:05:39 2015 +0300

----------------------------------------------------------------------
 dev-tools/src/main/groovy/jiraslurp.groovy | 30 ++++++++++++++++---------
 1 file changed, 20 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a92d394/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 109dfc0..ca31cfb 100644
--- a/dev-tools/src/main/groovy/jiraslurp.groovy
+++ b/dev-tools/src/main/groovy/jiraslurp.groovy
@@ -238,6 +238,19 @@ def findAttachments = {
     attachments
 }
 
+def tryGitAmAbort = {
+    try {
+        checkprocess "git am --abort".execute(null, new File("../"))
+
+        print "Succsessfull: git am --abort."
+    }
+    catch (Exception e) {
+        print "Error: git am --abort fails: "
+
+        e.printStackTrace()
+    }
+}
+
 /**
  * Applys patch from jira to given git state.
  */
@@ -254,7 +267,11 @@ def applyPatch = { jira, attachementURL ->
 
         patchFile << new URL("$ATTACHMENT_URL/$attachementURL/").text
 
+        println "Got patch content."
+
         try {
+            tryGitAmAbort()
+
             checkprocess "git branch".execute()
 
             checkprocess "git config user.email \"$userEmail\"".execute(null, new File("../"))
@@ -266,6 +283,8 @@ def applyPatch = { jira, attachementURL ->
 
             checkprocess "git branch".execute()
 
+            println "Trying to apply patch."
+
             checkprocess "git am dev-tools/${patchFile.name}".execute(null, new File("../"))
 
             println "Patch was applied successfully."
@@ -273,16 +292,7 @@ def applyPatch = { jira, attachementURL ->
         catch (Exception e) {
             println "Patch was not applied successfully. Aborting patch applying."
 
-            try {
-                checkprocess "git am --abort".execute(null, new File("../"))
-
-                print "Succsessfull: git am --abort."
-            }
-            catch (Exception e2) {
-                print "Error: git am --abort fails: "
-
-                e2.printStackTrace()
-            }
+            tryGitAmAbort()
 
             throw e;
         }