P4Web Release 2012.1 User Guide
[Getting Started]  [How To...]  [Browser Tips]  [Glossary]  [Road Map]  

Opening Files for Edit

A file can be opened for edit if:

When Perforce puts files in your workspace, it normally gives them read-only permission to start with. (See the sync command to find out how to get files into your workspace.) The open for edit command makes files writable so you can edit them, and puts them in a pending changelist so you can submit them later. The icon indicates that you have files open for edit.

You can open files for edit by:

The Open for Edit Options page

Selecting Open for edit... from the pulldown menu displays the Open for Edit page, where you can select the following file options.

After you have selected your options, click Open for edit.

Editing files when P4Web is running on a remote machine

P4Web mediates between a Web browser and a Perforce server. P4Web can run on a machine that is separate (remote) from both the browser and server machines. The important thing to understand is that your client workspace resides on the machine where P4Web is running. To edit files, remote users (users who are browsing from a machine other than the one where P4Web is running) must download the files to their local machine after checkout. To check the edited files in, remote users must upload them to the P4Web machine before. To edit files when working remotely, perform the following steps:

  1. Sync the file.
  2. Open the file for edit as described above.
  3. Download the file from the workspace on the P4Web machine to your local machine: choose Download file from Workspace from the Action menu.
    Because you're working locally on a copy of the file from the workspace, it doesn't matter where you save it on your local machine. When you upload it in step 5 below, you replace the workspace version with your edited version.
  4. Edit the file.
  5. Upload the file: Choose Upload File to Workspace from the Action menu, specify the file to be uploaded, and click Upload.
  6. Submit the file.

If you're editing text files, you can edit them directly in the browser, instead of downloading them and opening them with a text editor. To edit a text file in the browser, choose Edit Workspace File in P4Web from the Action menu. Edit the file and choose Save to save your changes.


Copyright 2012 Perforce Software. All rights reserved.