|CVS command ||Perforce command(s)||Description ||Remarks|
add||CVS: Schedule the file for addition to the repository.
Perforce: Opens files within the client workspace for addition to the depot.
The specified file(s) are linked to a changelist.
|To place the files into the source repository /depot:
submit (the changelist is sent to the server)
-t [type] +k
|Set RCS keyword substitution.||Perforce: The file type modifier +k is applied to the base types to allow
for support of RCS keyword expansion.|
|admin -kb or
|Set file type to binary. ||CVS: Defaults to text type, -kb turns off line ending conversion and keyword
Perforce: Attempts to determine the file's type when a file is opened with
add - this can be overridden with the -t option or the
typemap command. Binary files are stored compressed.
-t [type] +l
|Lock a file revision.||CVS: Called a "reserve checkout" (where only one user can edit a given
file at a time).
Perforce: lock allows anyone to open the file for edit, but only
the person who locked the file can submit it. By contrast, a file with
attribute +l allows only one person to open the file for edit
| annotate ||
annotate ||Show last revision where each line was modified. ||Perforce: With the -a option, all lines, including deleted
lines and lines no longer present at the head revision, are included
and each line includes a starting and ending revision.
| checkout ||
edit||Obtain copy of source and open file for edit. ||CVS: Unless watch is on, files can be changed once they
are checked out.
Perforce: sync populates the client workspace.
Use edit to open file(s) for edit.
| checkout/update -j ||
resolve ||Merge changes from the revision specified.||
| checkout/update -P ||
sync||Prune empty directories.||Perforce: set the "rmdir" option in the client specification
and empty directories are removed ("pruned") during a sync.
| commit ||
submit ||Check files into the repository. ||CVS: Changes can be submitted for multiple files but CVS does not ensure or track
that they were submitted together.
Perforce: Changes are grouped into changelists - an atomic change transaction
for a set of files all submitted together.
| diff ||
diff ||Show differences between revisions.||CVS: The default action is to compare your working files with the
revisions they were based on.
Perforce: Compares files in the client workspace to
revisions in the depot.
| rdiff ||
diff2 ||Show differences between releases.||CVS: diff files between two releases, operates directly from the repository.
Perforce: Compares two file revisions from the depot.
| diff/rdiff -c ||
-du ||Produce a "context diff" for use with the patch(1) utility.||
| edit ||
edit ||Tell the system you are modifying a file.
||CVS: Used when "watch" is on.
Perforce: When a file is opened for edit, it is associated
with a changelist for submission of the changes.
| editors ||
changes -s pending ||CVS: See who is editing a file.
Perforce: List pending changelists.
|CVS: Only useful if "watch" is on.
describe to view more information about a changelist.
| export ||N/A||Create a copy of the source without the CVS admin files. ||Perforce: Sync
can be used but requires the use of a client workspace. Also, there are no admin files
in the client workspace (all the admin information
is tracked on the server side in the metadata database).|
| history ||
p4d -v server=[level] ||Show command history. ||CVS: Only valid if history logging is turned on. Tracks each use of the
checkout, commit, rtag, update, and release commands.
Perforce: Turns on command tracing in the server (level 1 logs server
commands), which is logged into the server log.
| import ||
integ(rate) ||Incorporate or update an entire source distribution from an outside
source (for example, a source vendor) into your source repository directory. || Perforce: See KB Article #15
Creating a Vendor Branch for Third-party Source Code |
| init ||
depot ||Set up a new repository (depot).||
| log ||
where ||Display log information for files. ||
| login, logout, pserver ||
-P [password] [command], login, logout||Set up authentication. ||Perforce: By default, user records are created without passwords.
A user can use the passwd command to set the password,
and then provide the password to commands using the -P option or by setting
the P4PASSWD environment variable.|
| release ||
sync [file(s)]#none||Remove working copy.||CVS: the release command only works on an entire directory (module).
Perforce: You can sync to "#none" for a file or set of files.
| remove ||
delete||Remove a file from the repository (depot). ||Leaves the previous revisions intact. To apply the changes in the repository/depot:
| rtag, tag||
||Tag files with a label. ||
| rtag/tag -b ||
||Create a branch. ||
| status ||
fstat ||Display information about workspace files. ||Perforce:Other commands that show information
about workspace files:
| unedit ||
revert ||Undo an edit.||CVS: Only useful if "watch" is on.
Perforce: Note: the revert command does not display
a warning before discarding edits!
| update ||
sync ||Bring the workspace in sync with the repository. ||
update -j ||
resolve || Merge changes from a branch. ||
| watch add ||
reviews & the
Review daemons ||Tell the SCM system to notify you when the file is changed. ||CVS: notification can be provided when a file is opened for edit,
unedit(ed), or commited.
Perforce: Notification is provided when the files are checked in.
| watchers ||
reviews||See who wants to be notified about changes
to a file.