Kevin
PS:
how are you setting the variable ${host.name}?
Thanks
-----Original Message-----
From: Kevin O'Regan [mailto:[EMAIL PROTECTED]]
Sent: 12 March 2001 15:42
To: [EMAIL PROTECTED]
Subject: RE: Creating a p4 client workspace
> I'm trying to create a client workspace without invoking the
> editor. So
> first I define the settings for the workspace in a file and
> then I invoke p4
> to create the workspace, but it is failing for the reason shown below:
>
> [exec] Myos = Windows 2000
> [exec] p4 client -i <
> C:\DOCUME~1\mdunphy\LOCALS~1\Temp\p4clientworkspace.txt
> Execute:Java13CommandLauncher: p4 client -i <
> C:\DOCUME~1\mdunphy\LOCALS~1\Temp\p4_clientworkspace.txt
> [exec] Usage: client -i [ -f ]
> [exec] Unexpected arguments.
> [exec] Result: 1
>
> the exec task is shown below:
>
> <exec executable="p4">
> <arg line="client -i < ${p4.client.workspace}"/>
> </exec>
The only solution I found was to create a batch file that takes the
clientname and calls p4
i.e. mkClient.bat
p4 -c%1 client -i<%2
and takes the client name and description from ant.
i.e.
<target name="create_tmp_client">
<mkdir dir="${logs}"/>
<copy file="${Misc.Files}\default.client"
tofile="${logs}\p4client" overwrite="yes"/>
<replace file="${logs}\p4client" token="@Perforce.Client@"
value="ant-${user.name}-${host.name}"/>
<replace file="${logs}\p4client" token="@Perforce.Root@"
value="${basedir}"/>
<replace file="${logs}\p4client" token="@User.Name@"
value="ant-${user.name}"/>
<exec dir="${basedir}" executable="p4.exe"
output="${logs}\p4clientcreate.txt">
<arg line="-c$ant-${user.name}-${host.name} client
-o"/>
</exec>
<exec dir="${basedir}"
executable="${Misc.Files}\mkClient.bat" output="${logs}\p4clientmodify.txt">
<arg value="$ant-${user.name}-${host.name}"/>
<arg value="${logs}\p4client"/>
</exec>
</target>
regards
Kevin
KeyTools Java Development.
Baltimore Technologies.
----------------------------------------------------------------------------
-
Baltimore Technologies plc will not be liable for direct, special,
indirect
or consequential damages arising from alteration of the contents of
this
message by a third party or as a result of any virus being passed on.
In addition, certain Marketing collateral may be added from time to time to
promote Baltimore Technologies products, services, Global e-Security or
appearance at trade shows and conferences.
This footnote confirms that this email message has been swept by
Baltimore MIMEsweeper for Content Security threats, including
computer viruses.
http://www.baltimore.com