You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Thorsten Möller <Th...@stud.unibas.ch> on 2006/10/03 17:54:27 UTC

Synchronisation of diretories under version control

Hello,

My problem is that I want to synchronise arbitrary source directories with a 
target dir which is under version control by SVN. This means that in the 
target dir and each sub dir a directory ".svn" exists which must remain 
after synchronisation. However, when I use the <sync> task those SVN 
directories will be deleted since they do not exist in the source dir. As a 
result, the SVN working copy (which is the target dir) gets destroyed since 
all .svn directories are deleted during sync. Does anybody has an idea how 
to proceed? My idea was to copy all .svn dirs to a temp dir before sync and 
move them back after sync but unfortunately a simple copy like below doesn't 
do anything since won't get selected by the filesets probably because their 
name starts with "." (note that I'm working on a NTFS filesystem).

<copy todir="${temp}">
    <fileset dir="${src.dir}" includes=".svn"/>
    <fileset dir="${src.dir}" includes="**/.svn/"/>
</copy>



Thanks,
Thorsten


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Synchronisation of diretories under version control

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 3 Oct 2006, Thorsten Möller <Th...@stud.unibas.ch>
wrote:

> This means that in the target dir and each sub dir a directory
> ".svn" exists which must remain after synchronisation. However, when
> I use the <sync> task those SVN directories will be deleted since
> they do not exist in the source dir.

That's the use case which lead to the preserveInTarget element for Ant
1.7.0's sync task:

<http://ant.apache.org/manual-beta/CoreTasks/sync.html>

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org