com karma: Populate $this->revisions: lib/Git/PostReceiveHook.php
| From: | David Soria Parra | Date: | Tue, 20 Mar 2012 18:35:35 +0000 |
| Subject: | com karma: Populate $this->revisions: lib/Git/PostReceiveHook.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68094@lists.php.net to get a copy of this message | ||
Commit: bacc09d8928b6a04b9e8337d089eebd96f4a795d
Author: David Soria Parra <dsp@php.net> Tue, 20 Mar 2012 19:35:35 +0100
Parents: 5d94b4eef0bcfdc8f8cd2332cbab7881485a4d33
Branches: master
Link: http://git.php.net/?p=karma.git;a=commitdiff;h=bacc09d8928b6a04b9e8337d089eebd96f4a795d
Log:
Populate $this->revisions
Changed paths:
M lib/Git/PostReceiveHook.php
Diff:
bacc09d8928b6a04b9e8337d089eebd96f4a795d
diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php
index d278920..b7efb42 100644
--- a/lib/Git/PostReceiveHook.php
+++ b/lib/Git/PostReceiveHook.php
@@ -87,6 +87,12 @@ class PostReceiveHook extends ReceiveHook
}
}
+ foreach($this->refs as $ref) {
+ // magic populate the $this->revisions
+ if ($ref['changetype'] != self::TYPE_DELETED) {
+ $this->getBranchRevisions($ref['refname'],
$ref['changetype'], $ref['old'], $ref['new']);
+ }
+ }
//send mails per commit
foreach ($this->revisions as $revision => $branches) {
// check if it commit was already in other branches