|
Ant example source code file (needsresolve.xml)
The needsresolve.xml source code<!-- author Antoine Levy-Lambert --> <!-- this test shows that p4 submit can now indicate that a file needs to be resolved --> <!-- before running the test, edit this xml and change the 5 properties at the top to values which make sense on your system--> <!-- the test uses two Perforce client specs which must exist beforehand --> <!-- also using both client specs you should be able to edit the file ${depot_file_spec} --> <project name="testresolve" default= "test"> <property name="first_client" value="levyant_dev_ant"/> <property name="first_client_root" value="C:\dev\depot"/> <property name="second_client" value="levyant_cygwin_test"/> <property name="second_client_root" value="C:\dev\test"/> <property name="depot_file_spec" value="//depot/foobar"/> <target name="test"> <p4change client="${first_client}"/> <property name="change1" value="${p4.change}" /> <p4change client="${second_client}"/> <property name="change2" value="${p4.change}" /> <sequential> <antcall target="edit"> <param name="p4.client" value="${first_client}"/> <param name="client_root" value="${first_client_root}"/> <param name="change" value="${change1}"/> </antcall> <antcall target="edit"> <param name="p4.client" value="${second_client}"/> <param name="client_root" value="${second_client_root}"/> <param name="change" value="${change2}"/> </antcall> <antcall target="submit"> <param name="p4.client" value="${first_client}"/> <param name="change" value="${change1}"/> </antcall> <antcall target="submit"> <param name="p4.client" value="${second_client}"/> <param name="change" value="${change2}"/> </antcall> </sequential> </target> <target name="edit"> <echo> doing a change ${change} on client ${p4.client} </echo> <p4edit change="${change}" view="${depot_file_spec}"/> <mkdir dir="${client_root}/depot"/> <echo file="${client_root}/depot/foobar"> hello ${p4.client} ${change} </echo> </target> <target name="submit"> <p4submit change="${change}" needsresolveproperty="needsresolve" changeproperty="mychange"/> <echo> p4.needsresolve ${p4.needsresolve} after submit needsresolveproperty ${needsresolve} after submit changeproperty ${mychange} after submit </echo> </target> </project> Other Ant examples (source code examples)Here is a short list of links related to this Ant needsresolve.xml source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.