diff --git a/WHATSNEW b/WHATSNEW index 3a5ad6fb5..1ced73b80 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -453,6 +453,9 @@ Other changes: * now works for local repositories as well. + * has an option to ignore removed files now. + Bugzilla Report 26257. + Changes from Ant 1.7.0 TO Ant 1.7.1 ============================================= diff --git a/docs/manual/CoreTasks/cvstagdiff.html b/docs/manual/CoreTasks/cvstagdiff.html index cfd4d8090..3acbf641d 100644 --- a/docs/manual/CoreTasks/cvstagdiff.html +++ b/docs/manual/CoreTasks/cvstagdiff.html @@ -69,6 +69,11 @@ operation may fail when using such an incompatible client. The file in which to write the diff report. Yes + + ignoreRemoved + When set to true, the report will not include any + removed files. Since Ant 1.8.0 + No, defaults to false.

Parameters inherited from the cvs task

diff --git a/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java b/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java index afb3cb3dd..9089cbef7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java +++ b/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java @@ -136,6 +136,11 @@ public class CvsTagDiff extends AbstractCvsTask { */ private File mydestfile; + /** + * Used to skip over removed files + */ + private boolean ignoreRemoved = false; + /** * The package/module to analyze. * @param p the name of the package to analyse @@ -189,6 +194,18 @@ public class CvsTagDiff extends AbstractCvsTask { mydestfile = f; } + /** + * Set the ignore removed indicator. + * + * @param b the ignore removed indicator. + * + * @since Ant 1.8.0 + */ + public void setIgnoreRemoved(boolean b) { + ignoreRemoved = b; + } + + /** * Execute task. * @@ -353,6 +370,9 @@ public class CvsTagDiff extends AbstractCvsTask { } private boolean doFileWasRemoved(Vector entries, String line) { + if (ignoreRemoved) { + return false; + } int index = line.indexOf(FILE_WAS_REMOVED); if (index == -1) { return false;