p4 sync -n 显示sync的结果,但不是真的sync。
Examples
p4 sync | Copy the latest revision of all files from the depot to the client workspace, as mapped through the client view. If the file is already open in the client workspace, or if the latest revision of the file exists in the client workspace, it is not copied. |
p4 sync file.c#4 | Copy the fourth revision of file.c to the client workspace, with the same exceptions as in the example above. |
p4 sync //depot/proj1/...@21 | Copy all the files under the //depot/proj1 directory from the depot to the client workspace, as mapped through the client view. Don't copy the latest revision; use the revision of the file in the depot after changelist 21 was submitted. |
p4 sync @labelname | If labelname is a label created with p4 label, and populated with p4 labelsync, bring the workspace into sync with the files and revision levels specified in labelname. Files listed in labelname, but not in the workspace view, are not copied into the workspace. Files not listed in labelname are deleted from the workspace. (That is, @labelname is assumed to apply to all revisions up to, and including, the revisions specified in labelname. This includes the nonexistent revision of the unlisted files.) |
p4 sync @labelname,@labelname | Bring the workspace into sync with a label as with p4 sync @labelname, but preserve unlabeled files in the workspace. (The revision range @labelname,@labelname applies only to the revisions specified in the label name itself, and excludes the nonexistent revision of the unlisted files.) |
p4 sync @2011/06/24 | Bring the workspace into sync with the depot as of midnight, June 24, 2011. (That is, include all changes made during June 23.) |
p4 sync status%40june1st.txt | Sync a filename containing a Perforce wildcard by using the ASCII expression of the character's hexadecimal value. In this case, the file in the client workspace is status@june1st.txt. For details, see Limitations on characters in filenames and entities. |
p4 sync file.c#none | Sync to the nonexistent revision of file.c; the file is deleted from the workspace. |
p4 sync ...#none | Sync to the nonexistent revision of all files; all files in the workspace (that are under Perforce control) are removed. |