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

Class P4Change


public class P4Change
extends P4Base

Requests a new changelist from the Perforce server. P4Change creates a new changelist in perforce. P4Change sets the property ${p4.change} with the new changelist number. This should then be passed into p4edit and p4submit.
See Also:
P4Edit, P4Submit

Field Summary

protected String
description
Deprecated. You should not be accessing this variable directly.
protected String
emptyChangeList

Fields inherited from class org.apache.tools.ant.taskdefs.optional.perforce.P4Base

P4Client, P4CmdOpts, P4Opts, P4Port, P4User, P4View, failOnError, shell, util

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

Method Summary

static String
backslash(String value)
Ensure that a string is backslashing slashes so that it does not confuse them with Perl substitution delimiter in Oro.
void
execute()
creates a new Perforce change list sets the p4.change property to the number of the new change list
String
getEmptyChangeList()
returns the text of an empty change list
void
setDescription(String desc)
Description for ChangeList;optional.

Methods inherited from class org.apache.tools.ant.taskdefs.optional.perforce.P4Base

execP4Command, execP4Command, getErrorMessage, getInError, init, setClient, setCmdopts, setErrorMessage, setFailonerror, setGlobalopts, setInError, setPort, setUser, setView

Methods inherited from class org.apache.tools.ant.Task

execute, 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, log, log, setProject

Field Details

description

protected String description

Deprecated. You should not be accessing this variable directly.

Description of this task, if any.

emptyChangeList

protected String emptyChangeList

Method Details

backslash

public static final String backslash(String value)
Ensure that a string is backslashing slashes so that it does not confuse them with Perl substitution delimiter in Oro. Backslashes are always backslashes in a string unless they escape the delimiter.
Parameters:
value - the string to backslash for slashes
Returns:
the backslashed string

execute

public void execute()
            throws BuildException
creates a new Perforce change list sets the p4.change property to the number of the new change list
Overrides:
execute in interface Task
Throws:
BuildException - if the word error appears in the output coming from Perforce

getEmptyChangeList

public String getEmptyChangeList()
            throws BuildException
returns the text of an empty change list
Returns:
the text of an empty change list
Throws:
BuildException - if the text error is displayed in the Perforce output outside of a comment line

setDescription

public void setDescription(String desc)
Description for ChangeList;optional. If none is specified, it will default to "AutoSubmit By Ant"
Overrides:
setDescription in interface Task
Parameters:
desc - description for the change list

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