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 D693A172D0 for ; Wed, 27 May 2015 16:01:12 +0000 (UTC) Received: (qmail 41894 invoked by uid 500); 27 May 2015 16:01:12 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 41864 invoked by uid 500); 27 May 2015 16:01:12 -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 41855 invoked by uid 99); 27 May 2015 16:01:12 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 May 2015 16:01:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 201B71822A3 for ; Wed, 27 May 2015 16:01:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 7zTSh5Ry4J3q for ; Wed, 27 May 2015 16:00:53 +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 EEF0B20FEE for ; Wed, 27 May 2015 16:00:52 +0000 (UTC) Received: (qmail 41256 invoked by uid 99); 27 May 2015 16:00:52 -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; Wed, 27 May 2015 16:00:52 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F362EDFDF1; Wed, 27 May 2015 16:00:51 +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 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-ignite git commit: # ignite-456: removing of patches Date: Wed, 27 May 2015 16:00:51 +0000 (UTC) Repository: incubator-ignite Updated Branches: refs/heads/ignite-456 536275850 -> a4c88fedf # ignite-456: removing of patches Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a4c88fed Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a4c88fed Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a4c88fed Branch: refs/heads/ignite-456 Commit: a4c88fedfb0ae96ef7d1f8edddd4d41b9f06b80b Parents: 5362758 Author: null Authored: Wed May 27 19:00:49 2015 +0300 Committer: null Committed: Wed May 27 19:00:49 2015 +0300 ---------------------------------------------------------------------- dev-tools/slurp.sh | 2 +- dev-tools/src/main/groovy/jiraslurp.groovy | 66 +++++++++++++++---------- 2 files changed, 40 insertions(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a4c88fed/dev-tools/slurp.sh ---------------------------------------------------------------------- diff --git a/dev-tools/slurp.sh b/dev-tools/slurp.sh index 7eb6fdb..7edc776 100755 --- a/dev-tools/slurp.sh +++ b/dev-tools/slurp.sh @@ -52,7 +52,7 @@ TASK_RUNNER_USER='task_runner' TASK_RUNNER_PWD='' echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" -echo "<"$(date +"%H:%M:%S")"> Starting task triggering" +echo "<"$(date + "%D - %H:%M:%S")"> Starting task triggering" echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" # Useful settings http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a4c88fed/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 e4bb321..020c459 100644 --- a/dev-tools/src/main/groovy/jiraslurp.groovy +++ b/dev-tools/src/main/groovy/jiraslurp.groovy @@ -281,50 +281,62 @@ def tryGitAmAbort = { * Applys patch from jira to given git state. */ def applyPatch = { jira, attachementURL -> - def userEmail = System.getenv("env.GIT_USER_EMAIL"); - def userName = System.getenv("env.GIT_USER_NAME"); + // Delete all old IGNITE-*-*.patch files. + def directory = new File("./") + + println "Remove IGNITE-*-*.patch files in ${directory.absolutePath} and its subdirectories..." + + def classPattern = ~/.*IGNITE-.*-.*\.patch/ + + directory.eachFileRecurse(groovy.io.FileType.FILES) + { file -> + if (file ==~ classPattern){ + println "Deleting ${file}..." + file.delete() + } + } + + // Main logic. println "Patch apllying with jira='$jira' and attachment='$ATTACHMENT_URL/$attachementURL/'." + def userEmail = System.getenv("env.GIT_USER_EMAIL"); + def userName = System.getenv("env.GIT_USER_NAME"); + def patchFile = new File("${jira}-${attachementURL}.patch") - try { - println "Getting patch content." + println "Getting patch content." - patchFile << new URL("$ATTACHMENT_URL/$attachementURL/").text + patchFile << new URL("$ATTACHMENT_URL/$attachementURL/").text - println "Got patch content." + println "Got patch content." - try { - tryGitAmAbort() + try { + tryGitAmAbort() - execGit "git branch" + execGit "git branch" - execGit "git config user.email \"$userEmail\"" - execGit "git config user.name \"$userName\"" + 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()}" - execGit "git checkout -b ${newTestBranch}" + // Create a new uniqueue branch to applying patch + def newTestBranch = "test-branch-${jira}-${attachementURL}-${System.currentTimeMillis()}" + execGit "git checkout -b ${newTestBranch}" - execGit "git branch" + execGit "git branch" - println "Trying to apply patch." + println "Trying to apply patch." - execGit "git am dev-tools/${patchFile.name}" + execGit "git am dev-tools/${patchFile.name}" - println "Patch was applied successfully." - } - catch (Throwable e) { - println "Patch was not applied successfully. Aborting patch applying." + println "Patch was applied successfully." + } + catch (Throwable e) { + println "Patch was not applied successfully. Aborting patch applying." - tryGitAmAbort() + tryGitAmAbort() - throw e; - } - } - finally { - assert patchFile.delete(), 'Could not delete patch file.' + throw e; } }