public class Pvcs extends Task
The 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.
Constructor and Description |
---|
Pvcs()
Creates a Pvcs object
|
Modifier and Type | Method and Description |
---|---|
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.
|
String |
getConfig()
returns the path of the configuration file to be used
|
String |
getFilenameFormat()
The filenameFormat attribute defines a MessageFormat string used
to parse the output of the pcli command.
|
String |
getForce()
Get value of force
|
boolean |
getIgnoreReturnCode()
Get value of ignorereturncode
|
String |
getLabel()
Get value of label
|
String |
getLineStart()
The lineStart attribute is used to parse the output of the pcli
command.
|
String |
getPromotiongroup()
Get value of promotiongroup
|
String |
getPvcsbin()
Get name of the PVCS bin directory
|
String |
getPvcsproject()
Get name of the project in the PVCS repository
|
Vector |
getPvcsprojects()
Get name of the project in the PVCS repository
|
String |
getRepository()
Get network name of the PVCS repository
|
String |
getRevision()
Get value of revision
|
boolean |
getUpdateOnly()
get the updateOnly attribute.
|
String |
getUserId()
Get the userid.
|
String |
getWorkspace()
Get name of the workspace to store the retrieved files
|
protected int |
runCmd(Commandline cmd,
ExecuteStreamHandler out)
Run the command.
|
void |
setConfig(File f)
Sets a configuration file other than the default to be used.
|
void |
setFilenameFormat(String f)
The format of the folder names; optional.
|
void |
setForce(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(String l)
Only files marked with this label are extracted; optional.
|
void |
setLineStart(String l)
What a valid return value from PVCS looks like
when it describes a file.
|
void |
setPromotiongroup(String w)
Specifies the name of the promotiongroup argument
|
void |
setPvcsbin(String bin)
Specifies the location of the PVCS bin directory; optional if on the PATH.
|
void |
setPvcsproject(String prj)
The project within the PVCS repository to extract files from;
optional, default "/"
|
void |
setRepository(String repo)
The network name of the PVCS repository; required.
|
void |
setRevision(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(String u)
User ID
|
void |
setWorkspace(String ws)
Workspace to use; optional.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
public void addPvcsproject(PvcsProject p)
p
- the pvcs project to use.public void execute() throws BuildException
Task
execute
in class Task
BuildException
- Something is stopping the build...public String getConfig()
public String getFilenameFormat()
{0}-arc({1})
. Repositories where the archive
extension is not -arc should set this.public String getForce()
public boolean getIgnoreReturnCode()
public String getLabel()
public 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 String getPromotiongroup()
public String getPvcsbin()
public String getPvcsproject()
public Vector getPvcsprojects()
public String getRepository()
public String getRevision()
public boolean getUpdateOnly()
public String getUserId()
public String getWorkspace()
protected int runCmd(Commandline cmd, ExecuteStreamHandler out)
cmd
- the command line to use.out
- the output stream handler to use.public void setConfig(File f)
f
- config file - can be given absolute or relative to ant basedirpublic void setFilenameFormat(String f)
java.text.MessageFormat
.
Index 1 of the format will be used as the file name.
Defaults to {0}-arc({1})
f
- the format to use.public void setForce(String f)
f
- String (yes/no)public void setIgnoreReturnCode(boolean b)
b
- a boolean
value.public void setLabel(String l)
l
- Stringpublic void setLineStart(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.l
- the value to use.public void setPromotiongroup(String w)
w
- Stringpublic void setPvcsbin(String bin)
bin
- PVCS bin directorypublic void setPvcsproject(String prj)
prj
- Stringpublic void setRepository(String repo)
repo
- Stringpublic void setRevision(String r)
r
- Stringpublic void setUpdateOnly(boolean l)
l
- a boolean
value.public void setUserId(String u)
u
- the value to use.public void setWorkspace(String ws)
ws
- String