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 03F3617CC7 for ; Mon, 1 Jun 2015 12:35:54 +0000 (UTC) Received: (qmail 48023 invoked by uid 500); 1 Jun 2015 12:35:53 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 47990 invoked by uid 500); 1 Jun 2015 12:35:53 -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 47981 invoked by uid 99); 1 Jun 2015 12:35:53 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2015 12:35:53 +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 5A45CC0DFB for ; Mon, 1 Jun 2015 12:35:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.791 X-Spam-Level: * X-Spam-Status: No, score=1.791 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-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 JgiBGIyF0WOT for ; Mon, 1 Jun 2015 12:35:39 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 7AF0E254C6 for ; Mon, 1 Jun 2015 12:35:38 +0000 (UTC) Received: (qmail 46322 invoked by uid 99); 1 Jun 2015 12:35:36 -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; Mon, 01 Jun 2015 12:35:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B4191E0562; Mon, 1 Jun 2015 12:35:36 +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: Mon, 01 Jun 2015 12:35:45 -0000 Message-Id: <680af1fdff8e45579a8b4828f0c7bc63@git.apache.org> In-Reply-To: <6bbf9626ffb4404eb0f409b97c3ce3f6@git.apache.org> References: <6bbf9626ffb4404eb0f409b97c3ce3f6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/50] [abbrv] incubator-ignite git commit: # ignite-456: add more git logs # ignite-456: add more git logs Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4be517c8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4be517c8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4be517c8 Branch: refs/heads/ignite-648 Commit: 4be517c868e6798876a6eb44fcbc307ba4451603 Parents: 3a84c4b Author: null Authored: Wed May 27 15:19:41 2015 +0300 Committer: null Committed: Wed May 27 15:19:41 2015 +0300 ---------------------------------------------------------------------- dev-tools/src/main/groovy/jiraslurp.groovy | 36 +++++++++++++++++++------ 1 file changed, 28 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4be517c8/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 e1db80f..75a595f 100644 --- a/dev-tools/src/main/groovy/jiraslurp.groovy +++ b/dev-tools/src/main/groovy/jiraslurp.groovy @@ -51,6 +51,28 @@ def checkprocess = { process -> } } +def exec = {command, envp, dir -> + println "Executing command '$command'..." + + def ps = command.execute(envp, dir) + + try { + println "Command output:" + + println ps.text + } + catch (Throwable e) { + // Do nothing. + println "Error: could not get caommand output." + } + + checkprocess ps +} + +def execGit = {command -> + exec(command, null, new File("../")) +} + /** * Util method to send http request. */ @@ -252,8 +274,6 @@ def tryGitAmAbort = { } catch (Throwable e) { println "Error: git am --abort fails: " - - e.printStackTrace() } } @@ -278,20 +298,20 @@ def applyPatch = { jira, attachementURL -> try { tryGitAmAbort() - checkprocess "git branch".execute() + execGit "git branch" - checkprocess "git config user.email \"$userEmail\"".execute(null, new File("../")) - checkprocess "git config user.name \"$userName\"".execute(null, new File("../")) + execGit "git config user.email \"$userEmail\"" + execGit "git config user.name \"$userName\"" // Create a new uniqueue branch to applying patch def newTestBranch = "test-branch-${jira}-${attachementURL}-${System.currentTimeMillis()}" - checkprocess "git checkout -b ${newTestBranch}".execute(null, new File("../")) + execGit "git checkout -b ${newTestBranch}" - checkprocess "git branch".execute() + execGit "git branch" println "Trying to apply patch." - checkprocess "git am dev-tools/${patchFile.name}".execute(null, new File("../")) + execGit "git am dev-tools/${patchFile.name}" println "Patch was applied successfully." }