I am trying to get used to Perforce after using SVN where I was mostly using Commit and Get Latest.
But in perforce I am kind of confused.
What is the difference between terms Get Latest
and Check-out
in PerForce terminology?
Perforce allows you to check out the head revision or any previous revision of a file. To enforce the IDEs' check-in and check-out procedures, Perforce controls the read-write permissions of files. When files are checked out for edit, their permissions are set to read-write.
Depots, where Perforce keeps master file content, and workspaces, where users work on files, are hierarchical structures of directories and files. A filespec uses "//" to indicate the root of the hierarchy, and "/" as a directory path and file name separator. For example: //depot/projectA/doc/index.html.
When you check out a file, Perforce adds information about the file to a changelist and changes the writable attribute of the file in your local workspace from read-only to read/write. A changelist defines a logical grouping of work across a set of files and folders.
The Tree view is the page P4Web shows you when you first connect. It's where you'll spend most of your time in P4Web. You can use it to navigate through path hierarchies and run commands that affect all the files in the current path at once.
From "Perforce Basic Concepts":
p4 sync
) is about transferring files from the depot to your workspace.p4 edit
) is about getting the latest version from the depot for editing.As mentioned in "Perforce not syncing files correctly", a refresh (p4 sync
) will update only files that are not opened (checked out) even when "Force Operation" is enabled. (p4 sync -f
).
So the true difference is that a "check out" marks a file as being modified, and protect it from any refresh (any "get latest" operation).
Mark comments (and amend the "difference" I just mentioned above):
If you run a "
get latest
" (orsync
) on a file that is newer than the version that you have open for edit, that will set up a resolve conflict that needs to be dealt with.
So while the file won't be updated by a sync directly, Perforce will set up the conflict so that it can be updated by doing a resolve (and in fact, the resolve must be done before a file open for edit can be submitted).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With