Cari di Apache Ant 
    Apache Ant User Manual
Daftar Isi
(Sebelumnya) PropertyHelperRecord (Berikutnya)
Apache Ant Tasks

Pvcs

Apache Ant Pvcs Task User Manual

Note:Before using this task, the user running Ant must have access to thecommands of PVCS (get and pcli) and must have access to therepository. Note that the way to specify the repository is platformdependent so use property to specify location of repository.

by
Version 1.1 - 2001/06/27

Problems with UNC pathnames and the use of () in paths are fixed and an updateonly argument introduced.

Version 1.0 - 2001/01/31

Initial release.


Daftar Isi


Introduction

The pvcs task allows the user of Ant to extract the latest editionof the source code from a PVCS repository. PVCS is a version control systemdeveloped by Merant.
This version has been tested against PVCS version 6.5 and 6.6 under Windows and Solaris.

Pvcs Task

Description

The pvcs task is set to point at a PVCS repository and optionally a projectwithin that repository, and can from that specification get the latestversion of the files contained by the repository.

Parameters

AttributeDescriptionRequired
repositoryThe location of the repository (see your PVCSmanuals)Yes
pvcsprojectThe project within the PVCS repository to extractfiles from ("/" is root project and that is default if this attribute isn'tspecified)No
labelOnly files marked with this label are extracted.No
promotiongroupOnly files within this promotion group are extracted. Usingboth the label and the promotiongroup tag will cause the files in thepromotion group and with that label to be extracted.No
configpath of a non default .cfg file.Can be given absolute or relative to Ant's base directory.No
forceIf set to yes all files that exists and are writable are overwritten. Default no causes the files that are writable to be ignored. This stops the PVCS command get to stop asking questions!No
workspaceBy specifying a workspace, the files are extracted to that location. A PVCS workspace is aname for a location of the workfiles and isn't as such the location itself. You define the location for a workspaceusing the PVCS GUI clients. If this isn't specified the default workspace for the current user is used.No
pvcsbinOn some systems the PVCS executables pcliand get are not found in the PATH. In such cases this attributeshould be set to the bin directory of the PVCS installation containingthe executables mentioned before. If this attribute isn't specified thetag expects the executables to be found using the PATH environment variable.No
ignorereturncode If set to true the return value from executing the pvcs commands are ignored. No
updateonly If set to true files are gotten only if newer than existing local files. No
filenameformat The format of your folder names in a format suitable for java.text.MessageFormat. Defaults to {0}-arc({1}). Repositories where the archive extension is not -arc should set this. No
linestart Used to parse the output of the pcli command. It defaults to "P:. The parser already knows about / and , this property is useful in cases where the repository is accessed on a Windows platform via a drive letter mapping. No
revision Retrieve the specified revision. No
userid Use the specified userid. No

Nested Elements

pvcsproject element

pvcs supports a nested<pvcsproject> element, that represents a projectwithin the PVCS repository to extract files from. By nesting multiple<pvcsproject> elements under the<pvcs> task, multiple projects can bespecified.

Parameters

AttributeDescriptionRequired
nameThe name of the pvcs projectYes

Examples

The following set-up extracts the latest version of the files in the pvcs repository.
  <!-- =================================================================== -->  <!-- Get the latest version  -->  <!-- =================================================================== -->  <target name="getlatest"> <pvcs repository="/mnt/pvcs" pvcsproject="/myprj"/>  </target>

Now run:

ant getlatest

This will cause the following output to appear:

  getlatest:  [pvcs] PVCS Version Manager (VMGUI) v6.6.10 (Build 870) for Windows NT/80x86  [pvcs] Copyright 1985-2000 MERANT. All rights reserved.  [pvcs] PVCS Version Manager (get) v6.6.10 (Build 870) for Windows NT/80x86  [pvcs] Copyright 1985-2000 MERANT. All rights reserved.  [pvcs] c:mywsmyprjmain.java <- C:mypvcsarchivesmyprjmain.java-arc  [pvcs] rev 1.1  [pvcs] c:mywsmyprjapacheool.java <- C:mypvcsarchivesmyprjapacheools.java-arc  [pvcs] rev 1.5  BUILD SUCCESSFUL  Total time: 19 seconds
This next example extracts the latest version of the files in the pvcsrepository from two projects using nested <pvcsproject> elements.
  <!-- ===================================================================-->  <!-- Get latest from myprj and myprj2   -->  <!-- ===================================================================-->  <target name="getlatest2"> <pvcs repository="/mnt/pvcs">  <pvcsproject name="/myprj"/>  <pvcsproject name="/myprj2"/> </pvcs>  </target>

Now run:

ant getlatest2

This will cause the following output to appear:

  getlatest2:  [pvcs] PVCS Version Manager (VMGUI) v6.6.10 (Build 870) for Windows NT/80x86  [pvcs] Copyright 1985-2000 MERANT.  All rights reserved.  [pvcs] PVCS Version Manager (get) v6.6.10 (Build 870) for Windows NT/80x86  [pvcs] Copyright 1985-2000 MERANT.  All rights reserved.  [pvcs] c:mywsmyprjmain.java <- C:mypvcsarchivesmyprjmain.java-arc  [pvcs] rev 1.1  [pvcs] c:mywsmyprjapacheool.java <- C:mypvcsarchivesmyprjapacheool.java-arc  [pvcs] rev 1.5  [pvcs] c:mywsmyprj2apacheool2.java <- C:mypvcsarchivesmyprj2apacheool2.java-arc  [pvcs] rev 1.2  BUILD SUCCESSFUL  Total time: 22 seconds

PVCS is a registered trademark of MERANT.

(Sebelumnya) PropertyHelperRecord (Berikutnya)