Reputation: 11
I am writing an Ant script where I want to forcefully sync the client workspace from depot. Below is the code snippet that I am using, but I am not able to figure it out , how to use the flag -f in the xml. Can some please help me?
<target name="sync_head_sql" description="Sync the workspace with head sql">
<taskdef name="p4sync" classname="com.perforce.p4java.ant.tasks.SyncTask" classpathref="p4_classpath"/>
<p4sync
files="//pay_import2/pay/wup2-parent/WU_DEV_ABCD_JBOSS62_V2_594_3/data- engine/conf/..."
user="abcd"
port="xx.xx.xx.xx:1669"
client="wp-nagiosmon">
</p4sync>
</target>
The code mentioned above is able to sync the code successfully, but wants to know about the option of force sync. If i want to add in the above code, then how to do that? Where should i use the -f flag?
Thanks, Faraz
Upvotes: 1
Views: 215
Reputation: 2248
You can add the force
flag into your p4sync
tag like this:
<p4sync
files="//pay_import2/pay/wup2-parent/WU_DEV_ABCD_JBOSS62_V2_594_3/data- engine/conf/..."
force="true"
user="abcd"
port="xx.xx.xx.xx:1669"
client="wp-nagiosmon">
Upvotes: 1