|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--org.apache.tools.ant.taskdefs.optional.pvcs.Pvcs
Extracts 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.
19-04-2001
The task now has a more robust parser. It allows for platform independant 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.
Field Summary |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
Pvcs()
Creates a Pvcs object |
Method Summary | |
void |
addPvcsproject(PvcsProject p)
Specify a project within the PVCS repository to extract files from. |
void |
execute()
Called by the project to let the task do its work. |
java.lang.String |
getConfig()
returns the path of the configuration file to be used |
java.lang.String |
getFilenameFormat()
The filenameFormat attribute defines a MessageFormat string used to parse the output of the pcli command. |
java.lang.String |
getForce()
Get value of force |
boolean |
getIgnoreReturnCode()
Get value of ignorereturncode |
java.lang.String |
getLabel()
Get value of label |
java.lang.String |
getLineStart()
The lineStart attribute is used to parse the output of the pcli command. |
java.lang.String |
getPromotiongroup()
Get value of promotiongroup |
java.lang.String |
getPvcsbin()
Get name of the PVCS bin directory |
java.lang.String |
getPvcsproject()
Get name of the project in the PVCS repository |
java.util.Vector |
getPvcsprojects()
Get name of the project in the PVCS repository |
java.lang.String |
getRepository()
Get network name of the PVCS repository |
java.lang.String |
getRevision()
Get value of revision |
boolean |
getUpdateOnly()
|
java.lang.String |
getUserId()
|
java.lang.String |
getWorkspace()
Get name of the workspace to store the retrieved files |
protected int |
runCmd(Commandline cmd,
ExecuteStreamHandler out)
|
void |
setConfig(java.io.File f)
Sets a configuration file other than the default to be used. |
void |
setFilenameFormat(java.lang.String f)
The format of the folder names; optional. |
void |
setForce(java.lang.String f)
Specifies the value of the force argument; optional. |
void |
setIgnoreReturnCode(boolean b)
If set to true the return value from executing the pvcs commands are ignored; optional, default false. |
void |
setLabel(java.lang.String l)
Only files marked with this label are extracted; optional. |
void |
setLineStart(java.lang.String l)
What a valid return value from PVCS looks like when it describes a file. |
void |
setPromotiongroup(java.lang.String w)
Specifies the name of the promotiongroup argument |
void |
setPvcsbin(java.lang.String bin)
Specifies the location of the PVCS bin directory; optional if on the PATH. |
void |
setPvcsproject(java.lang.String prj)
The project within the PVCS repository to extract files from; optional, default "/" |
void |
setRepository(java.lang.String repo)
The network name of the PVCS repository; required. |
void |
setRevision(java.lang.String r)
Only files with this revision are extract; optional. |
void |
setUpdateOnly(boolean l)
If set to true files are fetched only if newer than existing local files; optional, default false. |
void |
setUserId(java.lang.String u)
User ID; unused. |
void |
setWorkspace(java.lang.String ws)
Workspace to use; optional. |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Pvcs()
Method Detail |
protected int runCmd(Commandline cmd, ExecuteStreamHandler out)
public void execute() throws BuildException
Task
execute
in class Task
BuildException
- Something is stopping the build...public java.lang.String getRepository()
public java.lang.String getFilenameFormat()
{0}-arc({1})
. Repositories where the archive
extension is not -arc should set this.
public void setFilenameFormat(java.lang.String f)
java.text.MessageFormat
.
Index 1 of the format will be used as the file name.
Defaults to {0}-arc({1})
public java.lang.String getLineStart()
"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.
public void setLineStart(java.lang.String l)
"P:
.
If you are not using an UNC name for your repository and the
drive letter P
is incorrect for your setup, you may
need to change this value, UNC names will always be
accepted.
public void setRepository(java.lang.String repo)
repo
- Stringpublic java.lang.String getPvcsproject()
public void setPvcsproject(java.lang.String prj)
prj
- Stringpublic java.util.Vector getPvcsprojects()
public java.lang.String getWorkspace()
public void setWorkspace(java.lang.String ws)
ws
- Stringpublic java.lang.String getPvcsbin()
public void setPvcsbin(java.lang.String bin)
bin
- PVCS bin directorypublic java.lang.String getForce()
public void setForce(java.lang.String f)
f
- String (yes/no)public java.lang.String getPromotiongroup()
public void setPromotiongroup(java.lang.String w)
w
- Stringpublic java.lang.String getLabel()
public void setLabel(java.lang.String l)
l
- Stringpublic java.lang.String getRevision()
public void setRevision(java.lang.String r)
r
- Stringpublic boolean getIgnoreReturnCode()
public void setIgnoreReturnCode(boolean b)
public void addPvcsproject(PvcsProject p)
p
- public boolean getUpdateOnly()
public void setUpdateOnly(boolean l)
public java.lang.String getConfig()
public void setConfig(java.io.File f)
f
- config file - can be given absolute or relative to ant basedirpublic java.lang.String getUserId()
public void setUserId(java.lang.String u)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |