Edit files

Now that the files are stored in the depot, you or others can check them out of the depot to edit them. To open files for edit, issue the p4 edit command, followed by the names(s) of the files you want to edit:

$ p4 edit file1.txt

This displays output like the following:

//JamCode/main/file1.txt#1 - opened for edit

Now you can edit the file in the editor of your choice and make changes. After you’ve made the desired changes, you submit the changelist associated with the file(s):

$ p4 submit

This open a change specification in an editor:

#
#  Change:      The change number. 'new' on a new changelist.
#  Date:        The date this specification was last modified.
#  Client:      The client on which the changelist was created.  Read-only.
#  User:        The user who created the changelist.
#  Status:      Either 'pending' or 'submitted'. Read-only.
#  Type:        Either 'public' or 'restricted'. Default is 'public'.
#  Description: Comments about the changelist.  Required.
#  ImportedBy:  The user who fetched or pushed this change to this server.
#  Identity:    Identifier for this change.
#  Jobs:        What opened jobs are to be closed by this changelist.
#               You may delete jobs from this list.  (New changelists only.)
#  Files:       What opened files from the default changelist are to be added
#               to this changelist.  You may delete files from this list.
#               (New changelists only.)

Change: new

Client: bruno_ws

User:   bruno

Status: new

Description:
        <enter description here>

Files:
        //JamCode/main/file1.txt       # edit

Enter a description under Description and then save your changes, to store the edits you made in the Helix Server depot. Something like the following output is displayed:

Change 2 created with 1 open file(s).
Submitting change 2.
Locking 1 files ...
edit //JamCode/main/file1.txt#2
Change 2 submitted.