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 against PVCS version 6.5 and 6.6 under Windows and Solaris. 19-04-2001The task now has a more robust parser. It allows for platform independent file paths and supports file names with (). Thanks to Erik Husby for bringing the bug to my attention. 27-04-2001
UNC paths are now handled properly. Fix provided by Don Jeffery. He also added an UpdateOnly flag that, when true, conditions the PVCS get using the -U option to only update those files that have a modification time (in PVCS) that is newer than the existing workfile. 25-10-2002
Added a revision attribute that currently is a synonym for label, but in a future release the behavior of the label attribute will change to use the -v option of GET. See bug #13847 for discussion.
Modifier and Type | Field and Description |
---|---|
private String | |
private String | |
private String | |
private static final String | GET_EXE
Constant for the thing to execute |
private boolean | |
private String | |
private String | |
private static final String | PCLI_EXE
Constant for the thing to execute |
private static final int | |
private static final int | |
private static final int | |
private String | |
private String | |
private String | |
private Vector | |
private String | |
private String | |
private boolean | |
private String | |
private String |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public void | addPvcsproject(PvcsProject
the pvcs project to use. p)Specify a project within the PVCS repository to extract files from. |
private void | |
public void | execute()
Overrides org. |
public String | Returns: the path of the config filereturns the path of the configuration file to be used |
private String | |
public String | Returns: the filename format attribute.The filenameFormat attribute defines a MessageFormat string used to parse the output of the pcli command. |
public String | |
public boolean | |
public String | |
public String | Returns: the lineStart attribute.The lineStart attribute is used to parse the output of the pcli command. |
public String | |
public String | |
public String | |
public Vector | |
public String | |
public String | |
public boolean | |
public String | |
public String | |
private void | massagePCLI(File in, File out)
Simple hack to handle the PVCS command-line tools botch when handling UNC notation. |
protected int | Returns: the exit code of the command.the command line to use. cmd, ExecuteStreamHandler the output stream handler to use. out)Run the command. |
public void | |
public void | |
public void | |
public void | setIgnoreReturnCode(boolean
a b)boolean value.If set to true the return value from executing the pvcs commands are ignored; optional, default false. |
public void | |
public void | setLineStart(String
the value to use. l)What a valid return value from PVCS looks like when it describes a file. |
public void | |
public void | setPvcsbin(String
PVCS bin directory bin)Specifies the location of the PVCS bin directory; optional if on the PATH. |
public void | setPvcsproject(String
String prj)The project within the PVCS repository to extract files from; optional, default "/" |
public void | |
public void | |
public void | setUpdateOnly(boolean
a l)boolean value.If set to true files are fetched only if newer than existing local files; optional, default false. |
public void | |
public void |
config | back to summary |
---|---|
private String config |
filenameFormat | back to summary |
---|---|
private String filenameFormat |
force | back to summary |
---|---|
private String force |
GET_EXE | back to summary |
---|---|
private static final String GET_EXE Constant for the thing to execute |
ignorerc | back to summary |
---|---|
private boolean ignorerc |
label | back to summary |
---|---|
private String label |
lineStart | back to summary |
---|---|
private String lineStart |
PCLI_EXE | back to summary |
---|---|
private static final String PCLI_EXE Constant for the thing to execute |
POS_1 | back to summary |
---|---|
private static final int POS_1 |
POS_2 | back to summary |
---|---|
private static final int POS_2 |
POS_3 | back to summary |
---|---|
private static final int POS_3 |
promotiongroup | back to summary |
---|---|
private String promotiongroup |
pvcsbin | back to summary |
---|---|
private String pvcsbin |
pvcsProject | back to summary |
---|---|
private String pvcsProject |
pvcsProjects | back to summary |
---|---|
private Vector<PvcsProject> pvcsProjects |
repository | back to summary |
---|---|
private String repository |
revision | back to summary |
---|---|
private String revision |
updateOnly | back to summary |
---|---|
private boolean updateOnly |
userId | back to summary |
---|---|
private String userId |
workspace | back to summary |
---|---|
private String workspace |
Pvcs | back to summary |
---|---|
public Pvcs() Creates a Pvcs object |
addPvcsproject | back to summary |
---|---|
public void addPvcsproject(PvcsProject p) Specify a project within the PVCS repository to extract files from.
|
createFolders | back to summary |
---|---|
private void createFolders(File file) throws IOException, ParseException Parses the file and creates the folders specified in the output section |
execute | back to summary |
---|---|
public void execute() throws BuildException Overrides org. Doc from org. Called by the project to let the task do its work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.
|
getConfig | back to summary |
---|---|
public String getConfig() returns the path of the configuration file to be used
|
getExecutable | back to summary |
---|---|
private String getExecutable(String exe) |
getFilenameFormat | back to summary |
---|---|
public String getFilenameFormat() The filenameFormat attribute defines a MessageFormat string used
to parse the output of the pcli command. It defaults to
|
getForce | back to summary |
---|---|
public String getForce() Get value of force
|
getIgnoreReturnCode | back to summary |
---|---|
public boolean getIgnoreReturnCode() Get value of ignorereturncode
|
getLabel | back to summary |
---|---|
public String getLabel() Get value of label
|
getLineStart | back to summary |
---|---|
public String getLineStart() The lineStart attribute is used to parse the output of the pcli
command. It defaults to
|
getPromotiongroup | back to summary |
---|---|
public String getPromotiongroup() Get value of promotiongroup
|
getPvcsbin | back to summary |
---|---|
public String getPvcsbin() Get name of the PVCS bin directory
|
getPvcsproject | back to summary |
---|---|
public String getPvcsproject() Get name of the project in the PVCS repository
|
getPvcsprojects | back to summary |
---|---|
public Vector Get name of the project in the PVCS repository
|
getRepository | back to summary |
---|---|
public String getRepository() Get network name of the PVCS repository
|
getRevision | back to summary |
---|---|
public String getRevision() Get value of revision
|
getUpdateOnly | back to summary |
---|---|
public boolean getUpdateOnly() get the updateOnly attribute.
|
getUserId | back to summary |
---|---|
public String getUserId() Get the userid.
|
getWorkspace | back to summary |
---|---|
public String getWorkspace() Get name of the workspace to store the retrieved files
|
massagePCLI | back to summary |
---|---|
private void massagePCLI(File in, File out) throws IOException Simple hack to handle the PVCS command-line tools botch when handling UNC notation.
|
runCmd | back to summary |
---|---|
protected int runCmd(Commandline cmd, ExecuteStreamHandler out) Run the command.
|
setConfig | back to summary |
---|---|
public void setConfig(File f) Sets a configuration file other than the default to be used. These files have a .cfg extension and are often found in archive or pvcsprop folders.
|
setFilenameFormat | back to summary |
---|---|
public void setFilenameFormat(String f) The format of the folder names; optional.
This must be in a format suitable for
|
setForce | back to summary |
---|---|
public void setForce(String f) Specifies the value of the force argument; optional. 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!
|
setIgnoreReturnCode | back to summary |
---|---|
public void setIgnoreReturnCode(boolean b) If set to true the return value from executing the pvcs commands are ignored; optional, default false.
|
setLabel | back to summary |
---|---|
public void setLabel(String l) Only files marked with this label are extracted; optional.
|
setLineStart | back to summary |
---|---|
public void setLineStart(String l) What a valid return value from PVCS looks like
when it describes a file. Defaults to
|
setPromotiongroup | back to summary |
---|---|
public void setPromotiongroup(String w) Specifies the name of the promotiongroup argument
|
setPvcsbin | back to summary |
---|---|
public void setPvcsbin(String bin) Specifies the location of the PVCS bin directory; optional if on the PATH. 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.
|
setPvcsproject | back to summary |
---|---|
public void setPvcsproject(String prj) The project within the PVCS repository to extract files from; optional, default "/"
|
setRepository | back to summary |
---|---|
public void setRepository(String repo) The network name of the PVCS repository; required.
|
setRevision | back to summary |
---|---|
public void setRevision(String r) Only files with this revision are extract; optional.
|
setUpdateOnly | back to summary |
---|---|
public void setUpdateOnly(boolean l) If set to true files are fetched only if newer than existing local files; optional, default false.
|
setUserId | back to summary |
---|---|
public void setUserId(String u) User ID
|
setWorkspace | back to summary |
---|---|
public void setWorkspace(String ws) Workspace to use; optional. 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.
|