Return-Path: X-Original-To: apmail-infrastructure-dev-archive@minotaur.apache.org Delivered-To: apmail-infrastructure-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 465BF9A65 for ; Wed, 6 Jun 2012 13:46:20 +0000 (UTC) Received: (qmail 55407 invoked by uid 500); 6 Jun 2012 13:46:20 -0000 Delivered-To: apmail-infrastructure-dev-archive@apache.org Received: (qmail 55302 invoked by uid 500); 6 Jun 2012 13:46:20 -0000 Mailing-List: contact infrastructure-dev-help@apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: infrastructure-dev@apache.org Delivered-To: mailing list infrastructure-dev@apache.org Received: (qmail 55294 invoked by uid 99); 6 Jun 2012 13:46:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 13:46:19 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jukka.zitting@gmail.com designates 209.85.212.176 as permitted sender) Received: from [209.85.212.176] (HELO mail-wi0-f176.google.com) (209.85.212.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 13:46:13 +0000 Received: by wibhn14 with SMTP id hn14so3704277wib.5 for ; Wed, 06 Jun 2012 06:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=Xloz93GE3QF6v8ozpefCX+7CRdoewXTW6tO7DDdEaP4=; b=xQ4KOtKxZ+pM34BaNyplcU+Hf2XMZo/K/zuhZL3st9AJOP6whJJCpNmWH5g6lYcoM1 nKutZtkElA6vhqdgD+ssT0uJaUruf71kVsC2cbKdmOjeokYn5YQN++S5k1CIN6j229c9 gnKkXwOD0ugIgbyGW6kHLdjXc2nyUh5fQ+q1HqhlEHmd9oEEry1FO9/YaE0C/1YTRb9C gRT7Tk5cgg40FFOGDs80zlYZxgOic0g0Jf202tyalf2gw3dtBd9btfINRuziIus1Ur+q gqdnloM1EGzytdO+l5BN2zrt2WMibkYUiHAl0D5NRssg86udMhOWvYV865ZsF/O6Gzh2 dR3w== Received: by 10.216.143.105 with SMTP id k83mr15776825wej.99.1338990352257; Wed, 06 Jun 2012 06:45:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.85.167 with HTTP; Wed, 6 Jun 2012 06:45:31 -0700 (PDT) In-Reply-To: <1338987421.9404.YahooMailNeo@web160902.mail.bf1.yahoo.com> References: <20120605175350.20B8DFFC3@tyr.zones.apache.org> <1338922313.17426.YahooMailNeo@web160904.mail.bf1.yahoo.com> <1338987421.9404.YahooMailNeo@web160902.mail.bf1.yahoo.com> From: Jukka Zitting Date: Wed, 6 Jun 2012 15:45:31 +0200 Message-ID: Subject: Re: [1/2] git commit: f92a685 - To: infrastructure-dev@apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi, On Wed, Jun 6, 2012 at 2:57 PM, Joe Schaefer wrote= : > Sounds interesting Jukka- especially if we could keep it well > correlated with the data in our "push logs".=A0 Do share more > details. Yep, basically the idea is that each entry in the push log (i.e. branch B advanced from revision X to revision Y) results in a push notification message. For example, your push updated the master branch from revision bee695d44c to f92a6853be. That update covers two commits (one normal and one merge, see "git log bee695d44c..f92a6853be") and changes just a single line (see "git diff bee695d44c..f92a6853be"). That information, a log of the commits and the diff of all changes, should be included in the push notification message. See below for a relevant snippet from the script I have in place at work. It has some Adobe-specific bits (HTML diffs, etc.), but I should be able to adapt it for Apache with not much effort. BR, Jukka Zitting ---- $payload->{ref} =3D~ /^(refs\/heads\/)?(.*)/; my $ref =3D $2; my $ref_html =3D html($ref); my $before =3D $payload->{before}; my $after =3D $payload->{after}; "$before..$after" =3D~ /^([a-f0-9]+\.\.[a-f0-9]+)$/ or die; my $range =3D $1; my $sbefore =3D substr($before, 0, 8); my $safter =3D substr($after, 0, 8); "$sbefore..$safter" =3D~ /^([a-f0-9]+\.\.[a-f0-9]+)$/ or die; my $srange =3D $1; my $log_text =3D `git log $range` or die; my $log_html =3D log_to_html($log_text); my $stat_text =3D `git diff --stat $range -- . ` or die; my $stat_html =3D stat_to_html($stat_text); my $diff_text =3D `git diff $range -- . ` or die; my $diff_html =3D diff_to_html($diff_text); my ($subject_text, $is_rtc, $has_rtc, $has_bug) =3D review_commits(@{$payload->{commits}}); my $subject_html =3D html($subject_text);