7. Notes for CVS Users : Common Operations

Common Operations
This section lists common version-control operations, and describes how to perform them with CVS, with the AccuRev CLI, and with the AccuRev GUI.
Obtaining a copy of the source files
CVS
cvs checkout <module>
AccuRev CLI
accurev mkws –w <workspace-name> –b <backing-streamname> –l <workspace-location>
AccuRev GUI
File > New > Workspace
Placing files under version control
CVS
cvs add <file(s)>
AccuRev CLI
accurev add <file(s)>
AccuRev GUI
Select files, right-click, Keep
Bringing others’ changes into your workspace/sandbox
CVS
1. cvs update –dP
2. Edit any merge conflicts.
AccuRev CLI
1. accurev update
2. accurev merge –o (edit any merge conflicts for each file)
AccuRev GUI
1. Go to the File Browser Incoming Changes mode.
2. If necessary, resolve any elements with (overlap) status (select and click the Merge button).
3. Click the Update button.
Saving your changes
CVS
cvs commit
AccuRev CLI
accurev keep –m
accurev promote –k
AccuRev GUI
1. Go to the File Browser Outgoing Changes mode.
2. Select the files you want to save and share with others.
3. Click the Promote button.
Finding the history of files
CVS
cvs history [ <file(s)> ]
AccuRev CLI
accurev hist [ <file(s)> ]
   ... or ...
accurev hist –a
AccuRev GUI
1. Select file, right-click, History > Show History.
   ... or ...
1. Admin > Depots
2. Right-click depot, History.
Finding the status of files in your workspace/sandbox
CVS
cvs status <file(s)>
AccuRev CLI
accurev stat <file(s)>
   ... or ...
accurev files <file(s)>
AccuRev GUI
Automatically displayed in File Browser
Removing files
CVS
1. cvs remove <file(s)>
2. cvs commit
AccuRev CLI
1. accurev defunct <file(s)>
2. accurev promote <file(s)>
AccuRev GUI
1. Select files, right-click, Defunct.
2. Select files, right-click, Promote.
Reverting changes to files
CVS
cvs unedit <file(s)>
AccuRev CLI
accurev purge <file(s)>
AccuRev GUI
Select files, right-click, Revert to > Basis Version.
   ... or ...
Select files, right-click, Revert to > Most Recent Version.
Moving files
CVS
1. cp <old-name> <new-name>
2. cvs remove <old-name>
3. cvs add <new-name>
AccuRev CLI
1. accurev move <old-name> <new-name>
2. accurev promote <new-name>
AccuRev GUI
1. Select file, right-click, Rename.
2. Select file, right-click, Promote.
Checking out files to edit
CVS
cvs edit <file(s)>
AccuRev CLI
Not necessary; just start editing the file.
AccuRev GUI
Not necessary; just start editing the file with right-click, Edit.
Comparing versions of files
CVS
cvs diff –r <rev1> –r <rev2> <file>
AccuRev CLI
accurev diff –v <rev1> –V <rev2> <file>
AccuRev GUI
1. Right-click file, History > Browse Versions.
2. Right-click version, Diff Against > Other Version, click other version.

Borland