Some updates for Subversion 0.33.0 to implement date operations (they

work over ra_dav these days), and to update the parsing of the ouput
from `svn log`.

* changelog/xdocs/properties.xml
  maven.changelog.range: Removed now unnecessary disclaimer about
  SVN and its ra_dav repository access module from the docs.


* changelog/src/main/org/apache/maven/svnlib/SvnChangeLogGenerator.java
  getScmDateArgument(Date, Date): Updated the JavaDoc and
  implementation to the correct date argument formatting for SVN.


* changelog/src/main/org/apache/maven/svnlib/SvnChangeLogParser.java
  pattern: Updated regex for new `svn log` output format.

  parse(InputStream): Tweaked inline comment.


* changelog/src/test/org/apache/maven/svnlib/SvnChangeLogParserTest.java
  Header JavaDoc tweak.


* changelog/src/test-resources/svnlib/svnlog.txt
  Updated to match the current log output format.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114396 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dlr committed 2003-11-22 22:52:13 +00:00
1 parent 1f0b2e26a4
commit 28cd8dae04
5 files changed
+27 -28

No files matched your search

@@ -78,8 +78,9 @@ import org.apache.tools.ant.types.Commandline;
* @author <a href="mailto:bodewig@apache.org">Stefan Bodewig</a>
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @author <a href="mailto:pete-apache-dev@kazmier.com">Pete Kazmier</a>
* @author Daniel Rall
* @version
* $Id: SvnChangeLogGenerator.java,v 1.2 2003/10/25 17:50:37 epugh Exp $
* $Id: SvnChangeLogGenerator.java,v 1.3 2003/11/22 22:52:13 dlr Exp $
*/
class SvnChangeLogGenerator extends AbstractChangeLogGenerator
{
@@ -110,8 +111,8 @@ class SvnChangeLogGenerator extends AbstractChangeLogGenerator
/**
* Construct the svn command-line argument that is used to specify
* the appropriate date range. This date option takes the format of
* "-D start:end" in the case of Subversion.
* the appropriate date range. This date option takes the format
* of <code>-r{start}:{end}</code> in the case of Subversion.
*
* @param before The starting point.
* @param to The ending point.
@@ -121,8 +122,9 @@ class SvnChangeLogGenerator extends AbstractChangeLogGenerator
protected String getScmDateArgument(Date before, Date to)
{
SimpleDateFormat outputDate = new SimpleDateFormat("yyyy-MM-dd");
// Specify to:before as that will sort the log entries for us
return "-D " + outputDate.format(to) + ":" + outputDate.format(before);
// Tell SVN to sort log entries from newest to oldest.
return "-r{" + outputDate.format(to) + "}:{" +
outputDate.format(before) + '}';
}
/**
@@ -82,7 +82,8 @@ import org.apache.regexp.RESyntaxException;
*
* @author <a href="mailto:dion@multitask.com.au">dIon Gillard</a>
* @author <a href="mailto:pete-apache-dev@kazmier.com">Pete Kazmier</a>
* @version $Id: SvnChangeLogParser.java,v 1.2 2003/10/25 17:50:37 epugh Exp $
* @author Daniel Rall
* @version $Id: SvnChangeLogParser.java,v 1.3 2003/11/22 22:52:13 dlr Exp $
*/
class SvnChangeLogParser implements ChangeLogParser
{
@@ -119,7 +120,7 @@ class SvnChangeLogParser implements ChangeLogParser
/** The pattern used to match svn header lines */
private static final String pattern =
"^rev (\\d+):\\s+" + // revision number
"^r(\\d+)\\s+\\|\\s+" + // revision number
"(\\w+)\\s+\\|\\s+" + // author username
"(\\d+-\\d+-\\d+ " + // date 2002-08-24
"\\d+:\\d+:\\d+) " + // time 16:01:00
@@ -193,7 +194,7 @@ class SvnChangeLogParser implements ChangeLogParser
BufferedReader stream = new BufferedReader(
new InputStreamReader(anInputStream));
// current state transitions in the state machine - starts with Get Header
// Current state transitions in the parser's state machine:
// Get Header -> Get File
// Get File -> Get Comment or Get (another) File
// Get Comment -> Get (another) Comment
+12 -12
View File
@@ -1,5 +1,5 @@
------------------------------------------------------------------------
rev 15: kaz | 2002-08-26 14:33:26 -0400 (Mon, 26 Aug 2002) | 3 lines
r15 | kaz | 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
@@ -7,56 +7,56 @@ Changed paths:
Minor formatting changes.
------------------------------------------------------------------------
rev 14: kaz | 2002-08-26 10:24:58 -0400 (Mon, 26 Aug 2002) | 3 lines
r14 | kaz | 2002-08-26 10:24:58 -0400 (Mon, 26 Aug 2002) | 3 lines
Changed paths:
M /poolserver/trunk/build.xml
Cleaned up some whitespace.
------------------------------------------------------------------------
rev 13: kaz | 2002-08-24 12:56:37 -0400 (Sat, 24 Aug 2002) | 3 lines
r13 | kaz | 2002-08-24 12:56:37 -0400 (Sat, 24 Aug 2002) | 3 lines
Changed paths:
M /poolserver/trunk/src/java
Added an svn:ignore property to ignore the 'tags' file.
------------------------------------------------------------------------
rev 12: kaz | 2002-08-24 12:31:41 -0400 (Sat, 24 Aug 2002) | 3 lines
r12 | kaz | 2002-08-24 12:31:41 -0400 (Sat, 24 Aug 2002) | 3 lines
Changed paths:
D /poolserver/trunk/src/java/net/ibasis/poolserver/impl/snmp/.SnmpPhysicalGateway.java.swp
Ditching a vim swap file.
------------------------------------------------------------------------
rev 11: kaz | 2002-08-24 00:20:25 -0400 (Sat, 24 Aug 2002) | 3 lines
r11 | kaz | 2002-08-24 00:20:25 -0400 (Sat, 24 Aug 2002) | 3 lines
Changed paths:
M /poolserver/trunk/src/java/net/ibasis/poolserver/impl/snmp/SnmpPhysicalGateway.java
Did some basic refactoring and just preparing to go-time.
------------------------------------------------------------------------
rev 10: kaz | 2002-08-24 00:19:39 -0400 (Sat, 24 Aug 2002) | 3 lines
r10 | kaz | 2002-08-24 00:19:39 -0400 (Sat, 24 Aug 2002) | 3 lines
Changed paths:
M /poolserver/trunk/build.xml
Added a ctags target in the event I have to use vim.
------------------------------------------------------------------------
rev 9: kaz | 2002-08-23 11:11:52 -0400 (Fri, 23 Aug 2002) | 3 lines
r9 | kaz | 2002-08-23 11:11:52 -0400 (Fri, 23 Aug 2002) | 3 lines
Changed paths:
M /poolserver/trunk/build.xml
Testing script out again ...
------------------------------------------------------------------------
rev 8: kaz | 2002-08-23 11:07:46 -0400 (Fri, 23 Aug 2002) | 3 lines
r8 | kaz | 2002-08-23 11:07:46 -0400 (Fri, 23 Aug 2002) | 3 lines
Changed paths:
M /poolserver/trunk/build.xml
Testing svn commit-email script ...
------------------------------------------------------------------------
rev 7: pete | 2002-08-23 11:03:39 -0400 (Fri, 23 Aug 2002) | 4 lines
r7 | pete | 2002-08-23 11:03:39 -0400 (Fri, 23 Aug 2002) | 4 lines
Changed paths:
M /poolserver/trunk/build.xml
@@ -64,14 +64,14 @@ Reformatted the indentation (really just an excuse to test out
subversion).
------------------------------------------------------------------------
rev 6: kaz | 2002-08-23 10:36:23 -0400 (Fri, 23 Aug 2002) | 3 lines
r6 | kaz | 2002-08-23 10:36:23 -0400 (Fri, 23 Aug 2002) | 3 lines
Changed paths:
M /poolserver/trunk/resources/WEB-INF/lib/xerces-1.4.4.jar
Replacing the xerces library as it seems to be corrupted.
------------------------------------------------------------------------
rev 5: kaz | 2002-08-22 11:28:22 -0400 (Thu, 22 Aug 2002) | 3 lines
r5 | kaz | 2002-08-22 11:28:22 -0400 (Thu, 22 Aug 2002) | 3 lines
Changed paths:
A /poolserver/trunk/build.xml
A /poolserver/trunk/poolserver.zargo
@@ -204,7 +204,7 @@ Changed paths:
Initial import of sources.
------------------------------------------------------------------------
rev 2: kaz | 2002-08-22 11:25:16 -0400 (Thu, 22 Aug 2002) | 1 line
r2 | kaz | 2002-08-22 11:25:16 -0400 (Thu, 22 Aug 2002) | 1 line
Changed paths:
A /poolserver/trunk
@@ -64,9 +64,10 @@ import junit.framework.TestCase;
import org.apache.maven.changelog.ChangeLogEntry;
/**
* Test cases for {@link SvnChangeLogParser}
* Test cases for {@link SvnChangeLogParser}.
*
* @author <a href="mailto:pete-apache-dev@kazmier.com">Pete Kazmier</a>
* @version $Id: SvnChangeLogParserTest.java,v 1.2 2003/10/25 17:50:37 epugh Exp $
* @version $Id: SvnChangeLogParserTest.java,v 1.3 2003/11/22 22:52:13 dlr Exp $
*/
public class SvnChangeLogParserTest extends TestCase
{
+1 -6
View File
@@ -20,12 +20,7 @@
<td>
Specifies the range to use when generating the change log.
This is used by the "changelog" goal. The default value is
<code>5</code> days. Note: when using the Subversion
changelog factory, you <b>must</b> set this property to an
empty value because the Subversion ra_dav module (used to
access DAV repositories) does not support date operations
yet. If you are using a local repository (ra_local), then
this does not apply to you.
<code>5</code> days.
</td>
</tr>
<tr>