org.apache.tools.ant.taskdefs.optional.perforce

Class P4Add

public class P4Add extends P4Base

Adds specified files to Perforce. Example Usage:
FunctionCommand
Add files using P4USER, P4PORT and P4CLIENT settings specified <P4add
P4view="//projects/foo/main/source/..."
P4User="fbloggs"
P4Port="km01:1666"
P4Client="fbloggsclient">
<fileset basedir="dir" includes="**/*.java">
</p4add>
Add files using P4USER, P4PORT and P4CLIENT settings defined in environment <P4add P4view="//projects/foo/main/source/..." />
<fileset basedir="dir" includes="**/*.java">
</p4add>
Specify the length of command line arguments to pass to each invocation of p4 <p4add Commandlength="450">

UNKNOWN: category="scm"

Method Summary
voidaddFileset(FileSet set)
Add a fileset whose files will be added to Perforce.
voidexecute()
Run the task.
voidsetChangelist(int changelist)
If specified the open files are associated with the specified pending changelist number; otherwise the open files are associated with the default changelist.
voidsetCommandlength(int len)
Set the maximum length of the commandline when calling Perforce to add the files.

Method Detail

addFileset

public void addFileset(FileSet set)
Add a fileset whose files will be added to Perforce.

Parameters: set the FileSet that one wants to add to Perforce Source Control.

execute

public void execute()
Run the task.

Throws: BuildException if the execution of the Perforce command fails.

setChangelist

public void setChangelist(int changelist)
If specified the open files are associated with the specified pending changelist number; otherwise the open files are associated with the default changelist.

Parameters: changelist the change list number.

Throws: BuildException if trying to set a change list number <=0.

setCommandlength

public void setCommandlength(int len)
Set the maximum length of the commandline when calling Perforce to add the files. Defaults to 450, higher values mean faster execution, but also possible failures.

Parameters: len maximum length of command line default is 450.

Throws: BuildException if trying to set the command line length to 0 or less.

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.