You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ba...@apache.org on 2015/01/27 04:40:58 UTC
svn commit: r1654973 - in
/continuum/trunk/continuum-base/continuum-scm/src/test:
java/org/apache/continuum/scm/ resources/org/ resources/org/apache/
resources/org/apache/continuum/ resources/org/apache/continuum/scm/
Author: batkinson
Date: Tue Jan 27 03:40:58 2015
New Revision: 1654973
URL: http://svn.apache.org/r1654973
Log:
[CONTINUUM-1640] Added sanity check that our maven-scm dep handles spaces in svn authors.
Added:
continuum/trunk/continuum-base/continuum-scm/src/test/java/org/apache/continuum/scm/ScmSanityTest.java
continuum/trunk/continuum-base/continuum-scm/src/test/resources/org/
continuum/trunk/continuum-base/continuum-scm/src/test/resources/org/apache/
continuum/trunk/continuum-base/continuum-scm/src/test/resources/org/apache/continuum/
continuum/trunk/continuum-base/continuum-scm/src/test/resources/org/apache/continuum/scm/
continuum/trunk/continuum-base/continuum-scm/src/test/resources/org/apache/continuum/scm/svnlog-with-space-in-author.txt
Added: continuum/trunk/continuum-base/continuum-scm/src/test/java/org/apache/continuum/scm/ScmSanityTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-scm/src/test/java/org/apache/continuum/scm/ScmSanityTest.java?rev=1654973&view=auto
==============================================================================
--- continuum/trunk/continuum-base/continuum-scm/src/test/java/org/apache/continuum/scm/ScmSanityTest.java (added)
+++ continuum/trunk/continuum-base/continuum-scm/src/test/java/org/apache/continuum/scm/ScmSanityTest.java Tue Jan 27 03:40:58 2015
@@ -0,0 +1,69 @@
+package org.apache.continuum.scm;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+import org.apache.maven.scm.ChangeSet;
+import org.apache.maven.scm.log.DefaultLog;
+import org.apache.maven.scm.provider.svn.svnexe.command.changelog.SvnChangeLogConsumer;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+
+/**
+ * Tests to verify assumptions and avoid regressions in SCM dependencies.
+ */
+public class ScmSanityTest
+ extends TestCase
+{
+
+ private InputStream getTestInput( String path )
+ {
+ return ScmSanityTest.class.getResourceAsStream( path );
+ }
+
+ /**
+ * Tests that CONTINUUM-1640 is fixed by updated maven-scm
+ */
+ public void testSvnLogWithSpaceInAuthorWorks()
+ throws Exception
+ {
+ SvnChangeLogConsumer consumer = new SvnChangeLogConsumer( new DefaultLog(), null );
+ InputStream input = getTestInput( "svnlog-with-space-in-author.txt" );
+ BufferedReader r = new BufferedReader( new InputStreamReader( input ) );
+ String line;
+
+ while ( ( line = r.readLine() ) != null )
+ {
+ consumer.consumeLine( line );
+ }
+
+ List modifications = consumer.getModifications();
+ assertEquals( 2, modifications.size() );
+
+ ChangeSet firstEntry = (ChangeSet) modifications.get( 0 );
+ assertEquals( "Immanuel Scheerer", firstEntry.getAuthor() );
+
+ ChangeSet secondEntry = (ChangeSet) modifications.get( 1 );
+ assertEquals( "Immanuel Scheerer", secondEntry.getAuthor() );
+ }
+}
Added: continuum/trunk/continuum-base/continuum-scm/src/test/resources/org/apache/continuum/scm/svnlog-with-space-in-author.txt
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-scm/src/test/resources/org/apache/continuum/scm/svnlog-with-space-in-author.txt?rev=1654973&view=auto
==============================================================================
--- continuum/trunk/continuum-base/continuum-scm/src/test/resources/org/apache/continuum/scm/svnlog-with-space-in-author.txt (added)
+++ continuum/trunk/continuum-base/continuum-scm/src/test/resources/org/apache/continuum/scm/svnlog-with-space-in-author.txt Tue Jan 27 03:40:58 2015
@@ -0,0 +1,28 @@
+------------------------------------------------------------------------
+r15 | Immanuel Scheerer | 2002-08-26 14:33:26 -0400 (Mon, 26 Aug 2002) | 3 lines
+Changed paths:
+ M /poolserver/trunk/build.xml
+ M /poolserver/trunk/project.properties
+
+Minor formatting changes.
+
+------------------------------------------------------------------------
+r328167 | Immanuel Scheerer | 2005-10-25 00:14:48 +0200 (mar., 25 oct. 2005) | 1 line
+Changed paths:
+ M /maven/scm/trunk/maven-scm-api/pom.xml
+ M /maven/scm/trunk/maven-scm-client/pom.xml
+ M /maven/scm/trunk/maven-scm-managers/maven-scm-manager-plexus/pom.xml
+ M /maven/scm/trunk/maven-scm-managers/pom.xml
+ M /maven/scm/trunk/maven-scm-plugin/pom.xml
+ M /maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/pom.xml
+ M /maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/pom.xml
+ M /maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/pom.xml
+ M /maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/pom.xml
+ M /maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/pom.xml
+ M /maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/pom.xml
+ M /maven/scm/trunk/maven-scm-providers/pom.xml
+ M /maven/scm/trunk/maven-scm-test/pom.xml
+ M /maven/scm/trunk/pom.xml
+
+Fix new version
+------------------------------------------------------------------------