Checking out and editing files
Before you edit a file, you must check it out of the Helix Server depot.
To check out and edit a file:
-
In the Solution Explorer, find the file that you want to edit.
If necessary, retrieve the correct revision to your workspace. For more information, see Retrieving files from the depot.
-
Right-click the file and choose one of the following:
- Checkout filename to check out only the selected file
- Checkout All in Project to check out the project file and all files in the project
- Checkout All in Solution to check out the solution file and all files in the solution
When you check a file out, it is placed in a changelist.
- Make your changes.
-
To check your revised version back into the depot so that other users can view your changes and edit it, right-click the file and choose Submit…
In the Pending Changelist dialog, enter a description of your changes and submit the changelist that contains the file. For more information, see Checking in files.
To display a file without checking it out, double-click the file icon. It opens in read-only mode.
To lock a file to prevent others from checking it out while you are working on it, right-click the file icon and select Manage Files > Lock. To unlock it, right-click and select Manage Files > Unlock.
When you try to edit or save a file that is checked into Helix Server, P4VS asks if you want to check it out (and save it, if you are attempting a save). It also gives you the following options:
- Don’t show this dialog again (always use the default changelist): always check out (when opening for edit) or check out and save (when saving edits) and add to the default changelist, without prompting from P4VS.
- Do this for all files being saved (or edited): if your save or edit operation involves multiple files, select this option to check out (when opening for edit) or check out and save (when saving) all files in the current operation without having the P4VS dialog prompt you for each file individually.