RCS & Perforce Command Comparison
SUMMARY
This article compares RCS commands and their Perforce equivalents. Use this table to determine the Perforce command that corresponds to an RCS command.
DETAILS
The following table summarizes SCM tasks and their corresponding commands in both RCS and Perforce. If a command is not listed, it does not exist.
Operation |
RCS Command |
Perforce Command |
|
| Set User Information |
|
p4 user |
|
| Set Client Information |
|
p4 client |
|
|
|
|
|
|
| Checkout File | co <file> | p4 sync <file>; p4 edit <file> |
|
| Get Specific Revision of File | co -r<rev> <file> | p4 sync <file>#<rev>; p4 edit <file> |
|
| Checkout and Lock File | co -l <file> | p4 sync <file>; p4 edit <file>; p4 lock <file> |
|
| Revert (Undo Checkout) File | co -u -d -M <file> | p4 revert <file> |
|
|
|
|
|
|
| Initial Check-in of File | ci -i <file> | p4 add <file>; p4 submit -d "<description>" |
|
| Check-in of File | ci -u <file> | p4 submit <file> |
|
| Check-in all opened files |
|
p4 submit -d "<description>" |
|
|
|
|
|
|
| Show log (file header) | rlog -h <file> | p4 files <file> |
|
| Show log (file) | rlog <file> | p4 filelog -l <file> |
|
| Show log (latest revision) | rlog -r <file> | p4 filelog -l -m1 <file> |
|
| Show log (set of files in a change) |
|
p4 describe -s <changelist> |
|
|
|
|
|
|
| Lock a file | rcs -l <file> | p4 lock <file> |
|
| Unlock a file | rcs -u <file> | p4 unlock <file> |
|
|
|
|
|
|
| Change the description of a change | rcs -mrev:<msg> file | p4 change -f <changelist> (requires admin/super access) |
|
| Create a label |
|
p4 label <labelname> |
|
| Attach a label to a file | rcs -n<name>[:[rev]] <file> | p4 tag -l <label> <file>[#<rev>] |
|
| Remove a file revision | rcs -o<rev> <file> | p4 delete <file>#<rev. |
|
|
|
|
|
|
| List all checkout files | get_checkedout | p4 opened |
|
| List opened files by user | get_checkedout -u <user> | p4 -u <user> opened |
|
| List files waiting to be updated |
|
p4 sync -n |
|
| Update all files | update_version | p4 sync |
|
|
|
|
|
|
| Compare file to stored revision | rcsdiff <file> | p4 diff -f <file> |
|
| Compare file revision to stored revision | rcsdiff -r<rev> <file> | p4 diff -f <file>#<rev> |
|
| Compare two revisions | rcsdiff -r<rev1> -r<rev2> <file> | p4 diff2 <file>#<rev1> <file>#<rev2> |
|
| List which files have changed |
|
p4 diff -se |
|
| List files opened and changed |
|
p4 diff -sa |
|
| List files missing from workspace |
|
p4 diff -sd |
|
