James Moger
2011-12-27 0fb1fd48c430d5dbb61485a9a6c6f52aac200e09
sendmail: list commits in chronological order
1 files modified
6 ■■■■ changed files
groovy/sendmail.groovy 6 ●●●● patch | view | raw | blame | history
groovy/sendmail.groovy
@@ -130,7 +130,7 @@
        
    switch (command.type) {
        case ReceiveCommand.Type.CREATE:
            def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name)
            def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()
            commitCount += commits.size()
            if (commits.size() > 0) {
                // new branch
@@ -146,7 +146,7 @@
            }
            break
        case ReceiveCommand.Type.UPDATE:
            def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name)
            def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()
            commitCount += commits.size()
            // fast-forward branch commits table
            changes += "$branchBreak $ref branch updated ($commits.size commits)\n$branchBreak"
@@ -154,7 +154,7 @@
            changes += '\n'
            break
        case ReceiveCommand.Type.UPDATE_NONFASTFORWARD:
            def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name)
            def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()
            commitCount += commits.size()
            // non-fast-forward branch commits table
            changes += "$branchBreak $ref branch updated [NON fast-forward] ($commits.size commits)\n$branchBreak"