Return-Path: Delivered-To: apmail-buildr-commits-archive@www.apache.org Received: (qmail 26875 invoked from network); 16 Sep 2009 17:47:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Sep 2009 17:47:01 -0000 Received: (qmail 56339 invoked by uid 500); 16 Sep 2009 17:47:01 -0000 Delivered-To: apmail-buildr-commits-archive@buildr.apache.org Received: (qmail 56309 invoked by uid 500); 16 Sep 2009 17:47:01 -0000 Mailing-List: contact commits-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@buildr.apache.org Delivered-To: mailing list commits@buildr.apache.org Received: (qmail 56300 invoked by uid 99); 16 Sep 2009 17:47:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2009 17:47:01 +0000 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, 16 Sep 2009 17:46:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 376942388865; Wed, 16 Sep 2009 17:46:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r815907 - in /buildr/trunk: CHANGELOG lib/buildr/core/build.rb spec/core/build_spec.rb Date: Wed, 16 Sep 2009 17:46:37 -0000 To: commits@buildr.apache.org From: boisvert@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090916174637.376942388865@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: boisvert Date: Wed Sep 16 17:46:36 2009 New Revision: 815907 URL: http://svn.apache.org/viewvc?rev=815907&view=rev Log: BUILDR-313: Prevent release with uncommitted_files on Git 1.4.3+ Modified: buildr/trunk/CHANGELOG buildr/trunk/lib/buildr/core/build.rb buildr/trunk/spec/core/build_spec.rb Modified: buildr/trunk/CHANGELOG URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=815907&r1=815906&r2=815907&view=diff ============================================================================== --- buildr/trunk/CHANGELOG (original) +++ buildr/trunk/CHANGELOG Wed Sep 16 17:46:36 2009 @@ -1,4 +1,5 @@ 1.3.5 (Pending) +* Fixed: BUILDR-313: Prevent release with uncommitted_files on Git 1.4.3+ (Alexis Midon) * Fixed: BUILDR-315: Fix Eclipse .classpath for local libraries (Mat Schaffer) * Added: BUILDR-300: Make Eclipse task more configurable (Antoine Toulme, Alex Boisvert) * Fixed: BUILDR-307 Failures are not reported correctly for ScalaTest (Jeremie Lenfant-Engelmann) Modified: buildr/trunk/lib/buildr/core/build.rb URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/build.rb?rev=815907&r1=815906&r2=815907&view=diff ============================================================================== --- buildr/trunk/lib/buildr/core/build.rb (original) +++ buildr/trunk/lib/buildr/core/build.rb Wed Sep 16 17:46:36 2009 @@ -126,7 +126,7 @@ # Returns list of uncommited/untracked files as reported by git status. def uncommitted_files - `git status`.scan(/^#\s{7}(\S.*)$/).map { |match| match.first.split.last } + `git status`.scan(/^#(\t|\s{7})(\S.*)$/).map { |match| match.last.split.last } end # Commit the given file with a message. Modified: buildr/trunk/spec/core/build_spec.rb URL: http://svn.apache.org/viewvc/buildr/trunk/spec/core/build_spec.rb?rev=815907&r1=815906&r2=815907&view=diff ============================================================================== --- buildr/trunk/spec/core/build_spec.rb (original) +++ buildr/trunk/spec/core/build_spec.rb Wed Sep 16 17:46:36 2009 @@ -211,7 +211,7 @@ Git.uncommitted_files.should be_empty end - it 'should reject a dirty repository' do + it 'should reject a dirty repository, Git 1.4.2 or former' do Git.should_receive(:`).with('git status').and_return <<-EOF # On branch master # @@ -229,6 +229,24 @@ EOF Git.uncommitted_files.should include('lib/buildr.rb', 'error.log') end + + it 'should reject a dirty repository, Git 1.4.3 or higher' do + Git.should_receive(:`).with('git status').and_return <<-EOF +# On branch master +# Changed but not updated: +# (use "git add ..." to update what will be committed) +# +#\tmodified: lib/buildr.rb +#\tmodified: spec/buildr_spec.rb +# +# Untracked files: +# (use "git add ..." to include in what will be committed) +# +#\terror.log +no changes added to commit (use "git add" and/or "git commit -a") + EOF + Git.uncommitted_files.should include('lib/buildr.rb', 'error.log') + end end describe '#remote' do