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

Class P4Edit


public class P4Edit
extends P4Base

Open file(s) for edit. P4Change should be used to obtain a new changelist for P4Edit as, although P4Edit can open files to the default change, P4Submit cannot yet submit to it. Example Usage:
<p4edit change="${p4.change}" view="//depot/project/foo.txt" />
To do:
Should call reopen if file is already open in one of our changelists perhaps?

Field Summary

String
change
number of the change list to work on

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

void
execute()
Run the p4 edit command
void
setChange(String change)
An existing changelist number to assign files to; optional but strongly recommended.

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

change

public String change
number of the change list to work on

Method Details

execute

public void execute()
            throws BuildException
Run the p4 edit command
Overrides:
execute in interface Task
Throws:
BuildException - if there is no view specified

setChange

public void setChange(String change)
An existing changelist number to assign files to; optional but strongly recommended.
Parameters:
change - the change list number

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