diff --git a/WHATSNEW b/WHATSNEW index a1b7e2b2f..a5fff7862 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -443,6 +443,9 @@ Other changes: the log file. Bugzilla Report 38029. + * is supposed to support CVSNT now. + Bugzilla Report 31409. + Changes from Ant 1.7.0 TO Ant 1.7.1 ============================================= diff --git a/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsVersion.java b/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsVersion.java index b4a60a90f..c0ba641a1 100644 --- a/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsVersion.java +++ b/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsVersion.java @@ -118,28 +118,29 @@ public class CvsVersion extends AbstractCvsTask { StringTokenizer st = new StringTokenizer(output); boolean client = false; boolean server = false; - boolean cvs = false; + String cvs = null; while (st.hasMoreTokens()) { String currentToken = st.nextToken(); if (currentToken.equals("Client:")) { client = true; } else if (currentToken.equals("Server:")) { server = true; - } else if (currentToken.equals("(CVS)")) { - cvs = true; + } else if (currentToken.startsWith("(CVS") + && currentToken.endsWith(")")) { + cvs = currentToken.length() == 5 ? "" : " " + currentToken; } - if (client && cvs) { + if (client && cvs != null) { if (st.hasMoreTokens()) { - clientVersion = st.nextToken(); + clientVersion = st.nextToken() + cvs; } client = false; - cvs = false; - } else if (server && cvs) { + cvs = null; + } else if (server && cvs != null) { if (st.hasMoreTokens()) { - serverVersion = st.nextToken(); + serverVersion = st.nextToken() + cvs; } server = false; - cvs = false; + cvs = null; } }