You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2005/03/14 10:33:30 UTC
cvs commit: ant/docs/manual/CoreTasks sync.html
bodewig 2005/03/14 01:33:30
Modified: . WHATSNEW
docs/manual/CoreTasks sync.html
Log:
Document sync's preserveintarget, PR: 21832
Revision Changes Path
1.774 +4 -0 ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/ant/WHATSNEW,v
retrieving revision 1.773
retrieving revision 1.774
diff -u -r1.773 -r1.774
--- WHATSNEW 14 Mar 2005 09:13:41 -0000 1.773
+++ WHATSNEW 14 Mar 2005 09:33:30 -0000 1.774
@@ -129,6 +129,10 @@
* fixcrlf can be used in a filterchain.
+* <sync> has a new nested element <preserveInTarget> 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
=====================================================
1.7 +36 -0 ant/docs/manual/CoreTasks/sync.html
Index: sync.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/CoreTasks/sync.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sync.html 7 Mar 2005 18:09:09 -0000 1.6
+++ sync.html 14 Mar 2005 09:33:30 -0000 1.7
@@ -61,6 +61,7 @@
systems. This can also be useful if source and target files live
on separate machines with clocks being out of sync. <em>since Ant
1.6</em>.</td>
+ <td valign="top" align="center">No.</td>
</tr>
</table>
@@ -70,6 +71,41 @@
<p><a href="../CoreTypes/fileset.html">FileSet</a>s are used to select
sets of files and directories.</p>
+<h4>preserveInTarget</h4>
+
+<p>Specifies files or directories that should be kept in the target
+directory even if they are not present in one of the source
+directories.</p>
+
+<p>This nested element is like a <a
+href="../CoreTypes/fileset.html">FileSet</a> except that it doesn't
+support the dir attribute and the usedefaultexcludes attribute
+defaults to false.</p>
+
+<h3>Examples</h3>
+
+<blockquote><pre>
+<sync todir="site">
+ <fileset dir="generated-site"/>
+</sync>
+</pre></blockquote>
+<p>overwrites all files in <em>site</em> with newer files from
+<em>generated-site</em>, deletes files from <em>site</em> that are not
+present in <em>generated-site</em>.</p>
+
+<blockquote><pre>
+<sync todir="site">
+ <fileset dir="generated-site"/>
+ <preserveintarget>
+ <include name="**/CVS/**"/>
+ </preserveintarget>
+</sync>
+</pre></blockquote>
+<p>overwrites all files in <em>site</em> with newer files from
+<em>generated-site</em>, deletes files from <em>site</em> that are not
+present in <em>generated-site</em> but keeps all files in any
+<em>CVS</em> sub-directory.</p>
+
<hr>
<p align="center">Copyright © 2003-2005 The Apache Software Foundation. All rights
Reserved.</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org