<HTML><HEAD><TITLE>P4Web User Guide - Opening Files for Edit</TITLE></HEAD><BODY><FONT SIZE=-1><B>P4Web Release 2012.1 User Guide</B></FONT><BR>
<FONT SIZE=-1><B><A HREF="quickstart.html">[Getting Started]</A> <A HREF="howto.html">[How To...]</A> <A HREF="tips.html">[Browser Tips]</A> <A HREF="defs.html">[Glossary]</A> <A HREF="roadmap.html">[Road Map]</A> </B></FONT><BR>
<H3>Opening Files for Edit</H3>
<P> A file can be opened for edit if:
<p>
<ul>
<li>The file is synced in your workspace
<li>You have permission to open the file
<li>The file is not already opened in your workspace
</ul>
<P>When Perforce puts files in your workspace, it normally gives them read-only
permission to start with. (See the <a href="sync.html">sync</a> command to find
out how to get files into your workspace.) The <b>open for edit</b> command
makes files writable so you can edit them, and puts them in a pending changelist
so you can submit them later. The <img src="../icons/edit.gif"> icon indicates that
you have files open for edit.
<p>
You can open files for edit by:
<ul>
<li>Choosing <b>Open for edit...</b> from the pulldown menu on the Files tab.
This menu option displays the <b>Open for Edit Options</b> page, described
in more detail below.
<p>
<li>Selecting the file and clicking the <b>Open for edit</b> button, which opens
the selected file for edit in the default changelist without changing its
filetype.
</ul>
<p>
<h3>The Open for Edit Options page</h3>
<p> Selecting <b>Open for edit...</b> from the pulldown menu displays the <b>Open
for Edit</b> page, where you can select the following file options.
<ul>
<li><b>Put opened files in changelist: </b>If your client workspace has more
than one pending changelist, this option enables you to select the changelist
into which opened files appear. </li>
<P>
<li><b>Specify filetype: </b>Use this option to change the <a href="help_filetypes.html">filetype</a>
of Perforce-managed files. Click the checkbox and select the filetype and
filetype modifier(s). When you submit files opened this way, the new revisions
in the depot will have the new filetype. </li>
<p>
<li><b>Restricting files</b>: If you came to this page by clicking a directory
and then choosing <B>Open for edit...</B> you can <a href="restrictfiles.html">restrict</a>
the files to be opened. </li>
</ul>
<p> After you have selected your options, click <b>Open for edit</b>.
<h3><a name="remote"></a>Editing files when P4Web is running on a remote machine</h3>
<p>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 <b>your client
workspace resides on the machine where P4Web is running</b>. 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:</p>
<ol>
<li><a href="sync.html"><b>Sync</b></a> the file.</li>
<li><b>Open the file for edit</b> as described above.</li>
<li><b>Download the file</b> from the workspace on the P4Web
machine to your local machine: choose <strong>Download file from Workspace</strong> from the <strong>Action</strong> menu.<br>
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.</li>
<li><b>Edit the file</b>.</li>
<li><b>Upload the file</b>: Choose <b>Upload File to Workspace</b>
from the <b>Action</b> menu, specify the file to be uploaded, and click <b>Upload</b>.</li>
<li><b><a href="submit.html">Submit</a> the file</b>.</li>
</ol>
<p>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 <b>Edit Workspace File in P4Web</b>
from the <b>Action</b> menu. Edit the file and choose <b>Save</b> to save your
changes. </p>
<P>
<HR>
<FONT SIZE=-1><I>
Copyright 2012 <A HREF="http://www.perforce.com">Perforce Software</A>.
All rights reserved.
</I></FONT>
</BODY></HTML>