>I would like to have the code if you do not mind please, >also did you test it both on Win and Unix. We only have Window version. Attached are 3 items. src zip, binary zip, and html doc cheers, TTTitle: PVCS task
Ant Pvcs Task User Manual
by- Thomas Christensen ([EMAIL PROTECTED])
- Don Jeffery ([EMAIL PROTECTED])
- Intelliware
Problems with UNC pathnames and the use of () in paths are fixed and an updateonly argument introduced.
Version 1.0 - 2001/01/31Initial release.
Table of Contents
- Introduction
- Pvcs Task
Introduction
The <pvcs> task allows the user of ant to extract the latest edition of the source code from a PVCS repository. PVCS is a version control system developed by Merant.Before using this tag, the user running ant must have access to the commands of PVCS (get and pcli) and must have access to the repository. Note that the way to specify the repository is platform dependent so use property to specify location of repository.
This version has been tested agains 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 project within that repository, and can from that specification get the latest version of the files contained by the repository.Parameters
| Attribute | Description | Required |
| repository | The location of the repository (see your PVCS manuals) | Yes |
| pvcsproject | The project within the PVCS repository to extract files from ("/" is root project and that is default if this attribute isn't specified) | No |
| label | Only files marked with this label are extracted. | No |
| id | specify user id and password pair e.g. <id>:<password> | No |
| promotiongroup | Only files within this promotion group are extracted. Using both the label and the promotiongroup tag will cause the files in the promotion group and with that label to be extracted. | No |
| force | If 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 |
| workspace | By specifying a workspace, the files are extracted to that location. A PVCS workspace is a name for a location of the workfiles and isn't as such the location itself. You define the location for a workspace using the PVCS GUI clients. If this isn't specified the default workspace for the current user is used. | No |
| pvcsbin | On some systems the PVCS executables pcli and get are not found in the PATH. In such cases this attribute should be set to the bin directory of the PVCS installation containing the executables mentioned before. If this attribute isn't specified the tag 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 |
Nested Elements
pvcsproject element
pvcs supports a nested
<pvcsproject> element, that represents a project
within the PVCS repository to extract files from. By nesting multiple
<pvcsproject> elements under the
<pvcs> task, multiple projects can be
specified.
Parameters
| Attribute | Description | Required |
| name | The name of the pvcs project | Yes |
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>
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:\myws\myprj\main.java <- C:\mypvcs\archives\myprj\main.java-arc [pvcs] rev 1.1 [pvcs] c:\myws\myprj\apache\tool.java <- C:\mypvcs\archives\myprj\apache\tools.java-arc [pvcs] rev 1.5
BUILD SUCCESSFUL Total time: 19 secondsThis next example extracts the latest version of the files in the pvcs repository 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>
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:\myws\myprj\main.java <- C:\mypvcs\archives\myprj\main.java-arc [pvcs] rev 1.1 [pvcs] c:\myws\myprj\apache\tool.java <- C:\mypvcs\archives\myprj\apache\tool.java-arc [pvcs] rev 1.5 [pvcs] c:\myws\myprj2\apache\tool2.java <- C:\mypvcs\archives\myprj2\apache\tool2.java-arc [pvcs] rev 1.2 BUILD SUCCESSFUL Total time: 22 seconds
PVCS is a registered trademark of MERANT.
pvcs_src.zip