Return-Path: Delivered-To: apmail-maven-continuum-commits-archive@www.apache.org Received: (qmail 69198 invoked from network); 7 Oct 2005 13:15:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Oct 2005 13:15:55 -0000 Received: (qmail 6363 invoked by uid 500); 7 Oct 2005 13:15:55 -0000 Delivered-To: apmail-maven-continuum-commits-archive@maven.apache.org Received: (qmail 6339 invoked by uid 500); 7 Oct 2005 13:15:55 -0000 Mailing-List: contact continuum-commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-dev@maven.apache.org Delivered-To: mailing list continuum-commits@maven.apache.org Received: (qmail 6328 invoked by uid 99); 7 Oct 2005 13:15:55 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 07 Oct 2005 06:15:54 -0700 Received: (qmail 69091 invoked by uid 65534); 7 Oct 2005 13:15:34 -0000 Message-ID: <20051007131534.69090.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r307112 - /maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/WorkingCopyContentGenerator.java Date: Fri, 07 Oct 2005 13:15:34 -0000 To: continuum-commits@maven.apache.org From: evenisse@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: evenisse Date: Fri Oct 7 06:15:29 2005 New Revision: 307112 URL: http://svn.apache.org/viewcvs?rev=307112&view=rev Log: [CONTINUUM-338] Exclude scm files (CVS, .svn, ...) Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/WorkingCopyContentGenerator.java Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/WorkingCopyContentGenerator.java URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/WorkingCopyContentGenerator.java?rev=307112&r1=307111&r2=307112&view=diff ============================================================================== --- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/WorkingCopyContentGenerator.java (original) +++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/WorkingCopyContentGenerator.java Fri Oct 7 06:15:29 2005 @@ -64,28 +64,38 @@ if ( !f.isDirectory() ) { - String userDirectory = null; + String fileName = f.getName(); - if ( f.getParentFile().getAbsolutePath().equals( basedir.getAbsolutePath() ) ) + if ( !".cvsignore".equals( fileName ) && !"vssver.scc".equals( fileName ) && !".DS_Store".equals( fileName ) ) { - userDirectory = "/"; - } - else - { - userDirectory = f.getParentFile().getAbsolutePath().substring( basedir.getAbsolutePath().length() + 1 ); - } + String userDirectory = null; + + if ( f.getParentFile().getAbsolutePath().equals( basedir.getAbsolutePath() ) ) + { + userDirectory = "/"; + } + else + { + userDirectory = f.getParentFile().getAbsolutePath().substring( basedir.getAbsolutePath().length() + 1 ); + } - userDirectory = StringUtils.replace( userDirectory, "\\", "/" ); + userDirectory = StringUtils.replace( userDirectory, "\\", "/" ); - buf.append( indent + "   " + f.getName() + "
" ); + buf.append( indent + "   " + fileName + "
" ); + } } else { - String userDirectory = f.getAbsolutePath().substring( basedir.getAbsolutePath().length() + 1 ); + String directoryName = f.getName(); + + if ( !"CVS".equals( directoryName ) && !".svn".equals( directoryName ) && !"SCCS".equals( directoryName ) ) + { + String userDirectory = f.getAbsolutePath().substring( basedir.getAbsolutePath().length() + 1 ); - userDirectory = StringUtils.replace( userDirectory, "\\", "/" ); + userDirectory = StringUtils.replace( userDirectory, "\\", "/" ); - buf.append( indent + "+ " + f.getName() + "
" ); + buf.append( indent + "+ " + directoryName + "
" ); + } } } else