Browse Source

cvschangelog detects ends of comments by looking for a line starting with ------

Unfortunately if somebody commits a file using a message like:
"added a new feature
--------
removed an old feature"

The second line will be identified as the end of the comment. The same for the
end of a changelog with '======'.

Using the right number of '-' or '=' fixes the problem temporarly until one
commit a file with a number of '-' or '=' greater or equals to the cvs
separator.

PR: 8085
Submitted by: fred@castify.net (Frederic Lavigne)


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272427 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
12df7ec426
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java

+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java View File

@@ -159,7 +159,7 @@ class ChangeLogParser {
saveEntry();
m_status = GET_FILE;
}
else if (line.startsWith("------")) {
else if( line.startsWith( "----------------------------" ) ) {
final int end = m_comment.length() - lineSeparator.length(); //was -1
m_comment = m_comment.substring(0, end);
m_status = GET_PREVIOUS_REV;


Loading…
Cancel
Save