Using the Ant PVCS Task
5 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_Svazic
Posted On:   Friday, November 30, 2001 10:01 PM

Has anyone had any luck with the PVCS task in Ant? Specifically, I'm trying to get a set of source files with a particular promotion group. I have 3 different promotion groups, Dev, QA and Production. However, when I use the following Ant task: pvcsproject="/source/proj1/src" promotiongroup="Dev" /> I get an error message saying that no promotion group "Dev" is found. However, I have verified (many, many times) that there is a Dev promotion group. The funny thing is that if I do not include the promotiongroup attribute, everything works as expected. The reason we're using promotion groups is to seperate stable and u   More>>

Has anyone had any luck with the PVCS task in Ant? Specifically, I'm trying to get a set of source files with a particular promotion group. I have 3 different promotion groups, Dev, QA and Production. However, when I use the following Ant task:



			

pvcsproject="/source/proj1/src"
promotiongroup="Dev" />



I get an error message saying that no promotion group "Dev" is found. However, I have verified (many, many times) that there is a Dev promotion group.


The funny thing is that if I do not include the promotiongroup attribute, everything works as expected.

The reason we're using promotion groups is to seperate stable and unstable code for automated build procedures. Can anyone offer any guidance?

   <<Less

Re: Using the Ant PVCS Task

Posted By:   Anonymous  
Posted On:   Thursday, February 28, 2002 05:48 AM

I think I have a work around. I set an environment variable in my bat file used to execute ant. By setting VCSCFG to the directory that contains your projectdb.cfg, typically under the metadata directory of your repository, getting by group works. This assumes that the groups are defined within that cfg file.

Re: Using the Ant PVCS Task

Posted By:   Bruce_Clements  
Posted On:   Tuesday, January 22, 2002 03:05 PM

Andrew May has written replacements for the pvcs task which accept a configFile attribute where appropriate. (See

links below.) Unfortunately, his pvcsget task doesn't support automatic discovery of config files. Here's a

parameterized target which uses pvcs's command line interface (pcli) to find the config file, and a call thereto:






dir="."
executable="pcli"
outputproperty="configFile1"
vmlauncher="false"
>




repository="${repository}"
pvcsbin="C:PROGRA~1PVCSVMwin32in"
force="yes"
configFile="\${configFile1}"
promotiongroup="${promotiongroup}"
>















Due to the exec task, this target is Windows-centric. Hopefully, pcli will be easier to deal with in a Unix

environment. Sorry I can't test that since we don't have a Unix installation of PVCS yet.


With this approach, you can operate on only one project at a time, but at least that's more than zero. Of course,

if you're willing to forego parameterization and put up with the exec ugliness before every pvcsget, then you can

include as many pvcsproject elements as you like.



Introduction to proposed PVCS tasks by Andrew May:


href="http://marc.theaimsgroup.com/?l=ant-dev&m=99667939904467&w=2">http://marc.theaimsgroup.com/?l=ant-dev&m=996679

39904467&w=2


Zip file containing source code of proposed PVCS tasks:


href="http://marc.theaimsgroup.com/?l=ant-dev&m=99667939904467&q=p3">http://marc.theaimsgroup.com/?l=ant-dev&m=99667

939904467&q=p3

Re: Using the Ant PVCS Task

Posted By:   Paul_Garvie  
Posted On:   Wednesday, January 16, 2002 12:54 PM

What a royal pain this was!! But thanks to Bruce Clements' insight, designating a configuration file appears to be the solution. Here is what I found on the Merant website:


Subject: get: Group does not exist in promotion hierarchy.


Solution:


A promotion group on an archive exists only in conjunction with a configuration file. If you reference the config file containing the promotion model you'll find that you can perform a get -g.


Here are the various ways how to make VM find a configuration file:


1. Add option -c to your get command:


get -cc:pvcsabc.cfg -g


2. Create a vcs.cfg in the current working directory. If you already have a configuration file which has a promotion group defined, simply rename it to vcs.cfg and place it in the current directory.


3. Point to a configuration file in a VCSCFG environment variable.
Embed a configuration file by using the following command from your vmwin32inadmin directory:


vconfig -c ..vmwfvc.dll


You can find more information about this in the Command line reference guide, chapter 2 - Using Directives, Configuration Files - How VM Searches for Configuration Files'. The guide can be found in your PVCS directory under ooksvmRGVMCLIRG.PDF.



In my case, to get the Reports_Stage promotion group copy of EcfReport.java, this worked on the command line:


get -N -cY:ecfecf_adminmaster.cfg -gReports_Stage Y:ecfecf_project_dbarchivesReportsusinessobjectsEcfReport.javav


I downloaded the 1.5 alpha source, made some changes to Pcvs.java, recompiled, rejarred optional.jar, then ran some tests. It appears to work. If anyone wants a copy, let me know, and I'll send it along.


For that matter, is this something the Ant project would be interested in? I don't know how to submit it.


Thanks


PaulG


pfg@usinternet.com

Re: Using the Ant PVCS Task

Posted By:   Anonymous  
Posted On:   Wednesday, December 12, 2001 05:48 PM

make sure that the repository attribute points to the directory that contains the archive directory.


for example in our shop a project named fooproj would have the follwoing direcotry structure:


fooproj/


fooproj/fooproj_project_db/

fooproj/fooproj_project_db/archives

fooproj/fooproj_project_db/archives/gui/

fooproj/fooproj_project_db/archives/gui/winmain.cpp



etc...



the best bet is to try the get command yourself and see what makes it work. then set the changes appropriately in your attributes

Re: Using the Ant PVCS Task

Posted By:   Erik_Hatcher  
Posted On:   Saturday, December 1, 2001 09:22 AM

Perhaps running with -debug or -verbose will give more insight into what the PVCS task is doing incorrectly. Please try that and report back the results in case there is a bug that needs to be corrected.
About | Sitemap | Contact