Options for the edit command

Namespace: Perforce.P4
Assembly: p4api.net (in p4api.net.dll) Version: 2017.3.160.836 (2017.3.160.0836)

Syntax

C#
public EditCmdOptions(
	EditFilesCmdFlags flags,
	int changeList,
	FileType fileType
)
Visual Basic
Public Sub New ( _
	flags As EditFilesCmdFlags, _
	changeList As Integer, _
	fileType As FileType _
)
Visual C++
public:
EditCmdOptions(
	EditFilesCmdFlags flags, 
	int changeList, 
	FileType^ fileType
)

Parameters

flags
Type: Perforce.P4..::..EditFilesCmdFlags
changeList
Type: System..::..Int32
fileType
Type: Perforce.P4..::..FileType

Return Value

Remarks


p4 help edit

edit -- Open an existing file for edit

p4 edit [-c changelist#] [-k -n] [-t filetype] file ...

Open an existing file for edit. The server records the fact that
the current user has opened the file in the current workspace, and
changes the file permission from read-only to read/write.

If -c changelist# is included, the file opened in the specified
pending changelist. If changelist number is omitted, the file is
opened in the 'default' changelist.

If -t filetype is specified, the file is assigned that Perforce
filetype. Otherwise, the filetype of the previous revision is reused.
If a partial filetype is specified, it is combined with the current
filetype.For details, see 'p4 help filetypes'.
Using a filetype of 'auto' will cause the filetype to be chosen
as if the file were being added, that is the typemap will be
considered and the file contents may be examined.

The -n flag previews the operation without changing any files or
metadata.

The -k flag updates metadata without transferring files to the
workspace. This option can be used to tell the server that files in
a client workspace are already editable, even if they are not in the
client view. Typically this flag is used to correct the Perforce
server when it is wrong about the state of files in the client
workspace, but incorrect use of this option can result in inaccurate
file status information.

'p4 edit' is not supported for files with propagating attributes
from an edge server in a distributed environment.

See Also