The most common operations in P4V are getting copies of the latest version of some files, performing edits, and submitting the revised files back into the depot.
P4V gives you several indications of file status. Here on the EWidget file we see a caution triangle that indicates we do not have the latest version. From the fractional indicator, we can see that version 2 is the most recent version in the depot and we have version 1.
We context-click the file and select “Get Latest Revision.” Now we have the latest version from the depot in the workspace on our computer. Most times, you would select a whole folder or project to get all the latest versions at once.
Here on the ENut file, we can see from the blue check that at least one other person has the ENut file checked out for edit. A quick mouse-over shows another developer named Joe Coder is working on it currently.
Concurrent development is no problem so we can check out ENut along with EWidget for edit. If you context-click a file, you could select check-out or you have the option to check-out and open a file in the default editor in one operation. Another quick method is to drag and drop them onto the pending changelist pane which we will do here.
The red check marks which just appeared indicate you have the files open for edit. Those files now appear with blue checks on everyone else’s workstation letting them know they are checked out by another user; in this case, you.
Now we are ready to get to work. Double-clicking on a file opens in the editor. You can set the default editor for any file type in the preferences menu of P4V.
First, let’s open ENut, change this constant, and save it.
Now let’s open EWidget, add a comment, and save it as well.
We are now ready to submit these files into the depot, but we decide we don’t want to include the changes to the EWidget file. By electing “Revert File” from the menu and confirming the selection, you can discard the changes and EWidget is no longer checked out for edit.
Now we will submit the ENut file to the depot by selecting Submit and completing the changelist description. Submissions to the depot do not need to be first out/first in. If you want to leave this transaction open, you can select “Save” to keep these items open for edit while checking out new files, making modifications, and submitting them before this pending changelist. For now, we just want to get this new version of ENut into the depot so we hit the “Submit” button.
Now your work is in the depot on the central server for everyone to view and edit, and the submitted changelist info has been updated to reflect this entry. Partial check ins are not allowed by the system. If there was a conflict with this file, the submit would not complete. Instead, P4V would walk you through the process of resolving the conflicts.
Thanks for watching.