Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF38F187FE for ; Tue, 26 May 2015 18:29:51 +0000 (UTC) Received: (qmail 93767 invoked by uid 500); 26 May 2015 18:29:51 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 93735 invoked by uid 500); 26 May 2015 18:29:51 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 93726 invoked by uid 99); 26 May 2015 18:29:51 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 May 2015 18:29:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 469E0C093B for ; Tue, 26 May 2015 18:29:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.791 X-Spam-Level: X-Spam-Status: No, score=0.791 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id tKnnm7d5_63r for ; Tue, 26 May 2015 18:29:40 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id AC48C258F7 for ; Tue, 26 May 2015 18:29:33 +0000 (UTC) Received: (qmail 92631 invoked by uid 99); 26 May 2015 18:29:33 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 May 2015 18:29:33 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 65CE6E0A1E; Tue, 26 May 2015 18:29:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Tue, 26 May 2015 18:29:45 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [13/22] incubator-ignite git commit: ignite-456 ignite-456 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d2af9e25 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d2af9e25 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d2af9e25 Branch: refs/heads/ignite-921 Commit: d2af9e255922077ab5881579c27d363575a6c5df Parents: edf6ffc Author: artem.shutak Authored: Mon May 25 18:55:14 2015 +0300 Committer: artem.shutak Committed: Mon May 25 18:55:14 2015 +0300 ---------------------------------------------------------------------- dev-tools/slurp.sh | 2 -- dev-tools/src/main/groovy/jiraslurp.groovy | 30 ++++++++++++++++--------- 2 files changed, 20 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d2af9e25/dev-tools/slurp.sh ---------------------------------------------------------------------- diff --git a/dev-tools/slurp.sh b/dev-tools/slurp.sh index 12b91f3..1636f21 100755 --- a/dev-tools/slurp.sh +++ b/dev-tools/slurp.sh @@ -58,8 +58,6 @@ git checkout ${DEFAULT_BRANCH} git pull export TC_URL=${TC_URL} -export GIT_USER_NAME=${GIT_USER_NAME} -export GIT_USER_EMAIL=${GIT_USER_EMAIL} export JIRA_USER=${JIRA_USER} export JIRA_PWD=${JIRA_PWD} export TASK_RUNNER_PWD=${TASK_RUNNER_PWD} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d2af9e25/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..0920001 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("../")) + + println "Succsessfull: git am --abort." + } + catch (Throwable e) { + println "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; }