From 3cdc6a2b694335104f55fcb16ff2f27d85c9792c Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Date: Mon, 14 Mar 2005 09:33:30 +0000
Subject: [PATCH] Document sync's preserveintarget, PR: 21832
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277921 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 4 ++++
docs/manual/CoreTasks/sync.html | 36 +++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/WHATSNEW b/WHATSNEW
index bedfd6846..4e36ed613 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -129,6 +129,10 @@ Other changes:
* fixcrlf can be used in a filterchain.
+* has a new nested element that can be used
+ to protect extra-content in the target directory. Bugzilla Report
+ 21832.
+
Changes from Ant 1.6.2 to current Ant 1.6 CVS version
=====================================================
diff --git a/docs/manual/CoreTasks/sync.html b/docs/manual/CoreTasks/sync.html
index f3a4222e0..65b8e8f87 100644
--- a/docs/manual/CoreTasks/sync.html
+++ b/docs/manual/CoreTasks/sync.html
@@ -61,6 +61,7 @@ more filesets.
systems. This can also be useful if source and target files live
on separate machines with clocks being out of sync. since Ant
1.6.
+ No. |
@@ -70,6 +71,41 @@ more filesets.
FileSets are used to select
sets of files and directories.
+preserveInTarget
+
+Specifies files or directories that should be kept in the target
+directory even if they are not present in one of the source
+directories.
+
+This nested element is like a FileSet except that it doesn't
+support the dir attribute and the usedefaultexcludes attribute
+defaults to false.
+
+Examples
+
+
+<sync todir="site">
+ <fileset dir="generated-site"/>
+</sync>
+
+overwrites all files in site with newer files from
+generated-site, deletes files from site that are not
+present in generated-site.
+
+
+<sync todir="site">
+ <fileset dir="generated-site"/>
+ <preserveintarget>
+ <include name="**/CVS/**"/>
+ </preserveintarget>
+</sync>
+
+overwrites all files in site with newer files from
+generated-site, deletes files from site that are not
+present in generated-site but keeps all files in any
+CVS sub-directory.
+
Copyright © 2003-2005 The Apache Software Foundation. All rights
Reserved.