Hi How do i use ant to get the latest files from PVCS?
Gopi Balaji
Ranch Hand
Joined: Jan 23, 2003
Posts: 84
posted
0
1. The command line tools "get" and "pcli" should be in the PATH environmental variable. 2. Use the optional ANT task pvcs as described in ANT's documentation -GB.
Mary Cole
Ranch Hand
Joined: Dec 02, 2000
Posts: 361
posted
0
Hi, I got the pcli.exe from my PVCS folder, but am not able to find the get exe Where should i find it
srinivasan ganesan
Ranch Hand
Joined: Mar 09, 2001
Posts: 54
posted
0
Mary, Here's an example build.xml <property name="pcli.cmd" value="pcli"/> <property name="get.cmd" value="run -scheckout.pcli"/> <property name="pvcs.project" value="YOUR PROJECT DATABASE NAME"/> <property name="pvcs.workspace" value="WORKSPACE YOU WANT TO USE"/> <exec executable="${pcli.cmd}"> <arg line="${get.cmd} ${pvcs.project} ${PROJECT_NAME} ${app.version} ${pvcs.workspace} ${DEST_DIR}"/> </exec>
checkout.pcli: set -r -vPCLI_IFS "\n\r" set -vPCLI_PR $1 set -vPCLI_PP $2 set -vVERNO $3 set -vPCLI_SP $4 set -vCHECKOUT_LOC $5 echo Starting checkout.pcli echo echo PCLI_PR = $PCLI_PR echo PCLI_PP = $PCLI_PP echo PCLI_SP = $PCLI_SP echo VERNO = $VERNO echo CHECKOUT_LOC = $CHECKOUT_LOC if Test "$VERNO"!="0" { # The -z takes a path parameter run -y -xoC:\Output.txt get -q -w -v\$VERNO -pr$PCLI_PR -z $PCLI_PP
} else { run -y -xoC:\Output.txt get -q -w -a$CHECKOUT_LOC -pr$PCLI_PR -z $PCLI_PP } exit
Mary Cole
Ranch Hand
Joined: Dec 02, 2000
Posts: 361
posted
0
Ur script is too complex..can you pls explain what has to go into the batch file args For me the PROJECT NAME IS === IBM Workspace is ---- "ROOTWORKSPACE" can you explain giving some dummy args andwhat each args mean [ March 04, 2004: Message edited by: Mary Cole ]
Mary Cole
Ranch Hand
Joined: Dec 02, 2000
Posts: 361
posted
0
any help on this guys??
James Giroux
Greenhorn
Joined: Mar 11, 2004
Posts: 2
posted
0
Steps for making Ant pvcs task work: repository = “//<servername>/<dir…><dir that contains .cfg file>” workspace = “/@/<workspace owner>/<WorkspaceName>” To set up a workspace or determine a workspace go into PVCS gui and right-click on the Project Database then select Set Workspace. If you only see “Root Workspace”, do the following: 1)Click New 2)Enter a WorkspaceName such as MyLocalWorkspace and click OK 3)Select MyLocalWorkspace and select Make this your default workspace 4)Click OK 5)Right-click on your top-level project and select Set Workfile Location… 6)Enter your Workfile Location and click OK 7)Right-click on the Project Database then select Set Workspace Now plugin MyWorkspace and owner Set a new environment variable: PCLI_ID=<userid>:<password>
Example: <project name="testcompile" default="getlatest" basedir="."> <!-- Initialize values --> <target name="init"> <property name="PVCSRepository" value="//myServer/myProjects/aProject"/> <property name="PVCSProject" value="/Components/shippingBeans"/> <property name="PVCSWorkspace" value="/@/jgiroux/MyLocalWorkspace"/> </target> <!-- Get the latest version --> <target name="getlatest"> <pvcs repository="${PVCSRepository}" pvcsproject="${PVCSProject}" workspace="${PVCSWorkspace}" /> </target> </project> Let me know if you need more help.
Mary Cole
Ranch Hand
Joined: Dec 02, 2000
Posts: 361
posted
0
Hey, Thx for your reply You have said to declare PCLI_IDEnv variable, but its never used. Also am getting an error as shown below when I run getLatest.. BUILD FAILED file :/ABC/Build/build.xml:35: Failed executing: get -N @D:\ABC\Build\pvcs_ant_-2 846547185213561423.log. Exception: CreateProcess: get -N @D:\ABC\Build\pvcs_ant_-2846547185 213561423.log error=2 My settings are---- PVCSRepository=w:\IBMDB PVCSProject=D:\IBMC PVCSWorkspace=/mary/MyLocalWorkspace whats the significance of @ in <property name="PVCSWorkspace" value="/@/jgiroux/MyLocalWorkspace"/>
Can you help me out...its urgent [ March 12, 2004: Message edited by: Mary Cole ] [ March 12, 2004: Message edited by: Mary Cole ]