FileDocCategorySizeDatePackage
P4Edit.javaAPI DocApache Ant 1.702437Wed Dec 13 06:16:22 GMT 2006org.apache.tools.ant.taskdefs.optional.perforce

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" />
todo
Should call reopen if file is already open in one of our changelists perhaps?
ant.task
category="scm"

Fields Summary
public String
change
number of the change list to work on
Constructors Summary
Methods Summary
public voidexecute()
Run the p4 edit command

throws
BuildException if there is no view specified

        if (change != null) {
            P4CmdOpts = "-c " + change;
        }
        if (P4View == null) {
            throw new BuildException("No view specified to edit");
        }
        execP4Command("-s edit " + P4CmdOpts + " " + P4View, new SimpleP4OutputHandler(this));
    
public voidsetChange(java.lang.String change)
An existing changelist number to assign files to; optional but strongly recommended.

param
change the change list number


    // CheckStyle:VisibilityModifier ON

                           
        
        this.change = change;