ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M.A.Dunphy" <madun...@bigfoot.com>
Subject RE: Creating a p4 client workspace
Date Mon, 12 Mar 2001 17:50:03 GMT
and the plot thickens..

I've taken the assumption that the hostname will be in an environment
variable. Now for the good bit, on NT this gives the hostname in uppercase
and when used in a p4 clientworkspace, p4 complains that I'm not running
from that host.

I may come to like p4 but at the moment I'm finding it a complete and utter
plain. ;-)

-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: 12 March 2001 17:30
To: ant-user@jakarta.apache.org
Subject: RE: Creating a p4 client workspace


The 'ant' and 'ant.bat' scripts allows or an "rc" file to be read in, if
one exists in the user's home dir, so you could have the host name
determined and set in the rc file (eg., "export HOST=`hostname`"), then
pass that value on the "$JAVACMD ..." line, or use the new "env"
functionality of <property> and access the value that way.

Diane

--- Kevin O'Regan <koregan@baltimore.com> wrote:
> another platform specific hack?
> 
> java -Dhost.name=%COMPUTERNAME% ... org.apache.tools.ant.Main etc
> 
> regards
> 
> Kevin
> 
> > -----Original Message-----
> > From: M.A.Dunphy [mailto:madunphy@bigfoot.com]
> > Sent: 12 March 2001 16:35
> > To: 'ant-user@jakarta.apache.org'
> > Subject: RE: Creating a p4 client workspace
> > 
> > 
> > Kevin
> > 
> > PS:
> > 
> > how are you setting the variable ${host.name}?
> > 
> > Thanks
> > 
> > 
> > 
> > -----Original Message-----
> > From: Kevin O'Regan [mailto:koregan@baltimore.com]
> > Sent: 12 March 2001 15:42
> > To: ant-user@jakarta.apache.org
> > 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 &lt; ${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
> > 
> > 
> > This footnote confirms that this email message has been swept by
> > MIMEsweeper for the presence of computer viruses.
> > 


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

Mime
View raw message