The Perforce sync command is used to synchronize your workspace files with the files in the depot. It uses your client spec to determine which depot files to get and where to put them in your workspace. You can click on your Client name at the top of any screen in P4Web to look at or edit your client spec.
If there are files in the depot that haven't been copied to your workspace, sync will copy them in. If any the depot files have been updated, sync will copy the newer files to your workspace. If you have files in your workspace that have been deleted in the depot, or if you have changed your client mapping so that files you previously synced are no longer in your client view, sync will remove those files from your workspace. If your workspace files are already in sync, the sync command will do nothing.
The
"" and
"
" icons mark workspace
files that are in sync with existing and deleted depot files,
respectively.
The "
" icon marks files that are
not in sync with head revisions in the depot.
If you have "Show entire depot" set,
files previously synced but no longer mapped in your client
view are marked with "
".
If you have files open for edit or integrate, sync will not
remove or copy over them. However, you won't be able to submit your
open files until you've resolved
changes from the newer files in the
depot. After you sync open files, they'll be marked with the
"" icon to remind you they need
to be resolved.
Normally files copied to your workspace by sync are read-only. Use open for edit to make them writable.
There are a couple of ways to run sync in P4Web:
Previewing shows you which files will be updated and where they will be written to your workspace.
"Sync to head revision" shortcut button
The Sync Options page lets you pick from these options before previewing or running the sync command:
If you came to the Sync Options page with a directory selected, you can restrict the files to be opened. Regardless of which files you select, a file is only synced to your workspace if:
P4Web mediates between a Web browser and a Perforce server. You can run P4Web on a machine that is separate from both the browser and server machines. When using P4Web remotely, the important thing to understand is that your workspace resides on the machine where P4Web is running, and not the machine where the browser is running.
P4Web enables you to edit text files directly in your browser, even when P4Web is running on a remote machine. However, to edit binary files on a remote machine, you must sync them, open them for edit, and then download them to your browser machine. To submit edited files from a remote machine, you must upload them to the workspace on the P4Web machine before submitting them.
Downloading and uploading binary files: