Note: Before using this task, 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.
byProblems with UNC pathnames and the use of () in paths are fixed and an updateonly argument introduced.
Version 1.0 - 2001/01/31Initial release.
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 |
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 |
config | path of a non default .cfg file. Can be given absolute or relative to Ant's base directory. | 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 |
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 |
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.
Attribute | Description | Required |
name | The name of the pvcs project | Yes |
<!-- =================================================================== --> <!-- 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:\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>
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:\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.