Return-Path: Delivered-To: apmail-incubator-rat-commits-archive@locus.apache.org Received: (qmail 84503 invoked from network); 21 May 2008 20:48:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2008 20:48:35 -0000 Received: (qmail 65815 invoked by uid 500); 21 May 2008 20:48:37 -0000 Delivered-To: apmail-incubator-rat-commits-archive@incubator.apache.org Received: (qmail 65793 invoked by uid 500); 21 May 2008 20:48:37 -0000 Mailing-List: contact rat-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: rat-dev@incubator.apache.org Delivered-To: mailing list rat-commits@incubator.apache.org Received: (qmail 65784 invoked by uid 99); 21 May 2008 20:48:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2008 13:48:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2008 20:47:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DB9B22388A05; Wed, 21 May 2008 13:48:14 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r658858 - in /incubator/rat/main/trunk/scan/src/org/apache/rat/scan: antlib.xml connect.py diff.py Date: Wed, 21 May 2008 20:48:14 -0000 To: rat-commits@incubator.apache.org From: rdonkin@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080521204814.DB9B22388A05@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rdonkin Date: Wed May 21 13:48:13 2008 New Revision: 658858 URL: http://svn.apache.org/viewvc?rev=658858&view=rev Log: Exit gracefully on first run Modified: incubator/rat/main/trunk/scan/src/org/apache/rat/scan/antlib.xml incubator/rat/main/trunk/scan/src/org/apache/rat/scan/connect.py incubator/rat/main/trunk/scan/src/org/apache/rat/scan/diff.py Modified: incubator/rat/main/trunk/scan/src/org/apache/rat/scan/antlib.xml URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/scan/src/org/apache/rat/scan/antlib.xml?rev=658858&r1=658857&r2=658858&view=diff ============================================================================== --- incubator/rat/main/trunk/scan/src/org/apache/rat/scan/antlib.xml (original) +++ incubator/rat/main/trunk/scan/src/org/apache/rat/scan/antlib.xml Wed May 21 13:48:13 2008 @@ -79,6 +79,7 @@ + @@ -119,6 +120,16 @@ + + + + + + Changes file expected at @{input-dir}/${org.apache.rat.scan.name.diff} but is missing. + + + + + + + + + + + + + + Modified: incubator/rat/main/trunk/scan/src/org/apache/rat/scan/connect.py URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/scan/src/org/apache/rat/scan/connect.py?rev=658858&r1=658857&r2=658858&view=diff ============================================================================== --- incubator/rat/main/trunk/scan/src/org/apache/rat/scan/connect.py (original) +++ incubator/rat/main/trunk/scan/src/org/apache/rat/scan/connect.py Wed May 21 13:48:13 2008 @@ -111,5 +111,9 @@ prefix = base_file_name[0:-14] auditor = diff.Auditor(build_dir, prefix) auditor.printSignatureChecks() - save(diff_file, addPreamble(auditor.latestDiffs())) + latestDiffs = auditor.latestDiffs() + if latestDiffs == None: + print "First run so skipping comparison " + else: + save(diff_file, addPreamble(latestDiffs)) \ No newline at end of file Modified: incubator/rat/main/trunk/scan/src/org/apache/rat/scan/diff.py URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/scan/src/org/apache/rat/scan/diff.py?rev=658858&r1=658857&r2=658858&view=diff ============================================================================== --- incubator/rat/main/trunk/scan/src/org/apache/rat/scan/diff.py (original) +++ incubator/rat/main/trunk/scan/src/org/apache/rat/scan/diff.py Wed May 21 13:48:13 2008 @@ -197,7 +197,10 @@ def latestDiffs(self): latest = self.latest() - return self.diffs(latest[1], latest[0]) + if len(latest)>1: + return self.diffs(latest[1], latest[0]) + else: + return None def diffs(self, one, two): added, removed, modified = one.compare(two)