Skip to content
Browse files

Merge pull request #6 from alexlehm/master

fix [JENKINS-12586] cvs-plugin fails to read old changelog files
  • Loading branch information...
alexlehm committed Feb 12, 2012
2 parents 1ccef67 + be6dd95 commit f82d0b2c6ca9b8eb3bb175ebf3de3668c65be118
@@ -149,9 +149,9 @@ public static CVSChangeLogSet parse(final AbstractBuild<?, ?> build,
private static final DateFormat CHANGE_DATE_FORMATTER = new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss");
private static final DateFormat DATE_FORMATTER = new SimpleDateFormat(
private static final DateFormat TIME_FORMATTER = new SimpleDateFormat(

private User author;
private String msg;
@@ -0,0 +1,22 @@
package hudson.scm;


import org.junit.Test;
import org.jvnet.hudson.test.HudsonTestCase;

public class CVSChangeLogParserTest extends HudsonTestCase {

// borrowed from core/test/.../TestResultTest
private File getDataFile(String name) throws URISyntaxException {
return new File(CVSChangeLogParserTest.class.getResource(name).toURI());

// verify fix for JENKINS-12586
public void testParseOldFile() throws Exception {
CVSChangeLogSet result = new CVSChangeLogParser().parse(null, getDataFile("changelogOldFormat.xml"));
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
example changelog.xml from 1.6 plugin, the format has changed in 2.0
but the old format is still read.
The file is used to check parsing the old format to verify this issue:
the old format uses yyyy-mm-DD and HH:mm for date and time
<msg><![CDATA[example entry]]></msg>

0 comments on commit f82d0b2

Please sign in to comment.
You can’t perform that action at this time.