You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2015/06/01 04:57:04 UTC
[13/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-843
Commit: 4be517c868e6798876a6eb44fcbc307ba4451603
Parents: 3a84c4b
Author: null <null>
Authored: Wed May 27 15:19:41 2015 +0300
Committer: null <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."
}