// moved to misc directory and got snapshot from cvs
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/qwt login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/qwt co -P qwt
from /misc
cvs checkout proj
cvs update proj
moved to graphics and edited obj.h
cvs update - M means file has been modified
cvs diff - show diff between repository and current directory
cvs -Q diff -c - a much more readable diff
cvs -q diff - at project base has no output if local matches repository
Find a command that only gives the differences in file names.
cvs -q update -P .
cvs -q update - more quite information presentation
M Session.vim
M include/gobj.h
- where M meas the file was modified. To commit the changes
cvs commit -m "untested graphics"
// Individual files can be targeted.
cvs commit include/gobj.h
// cvs short forms
eg ci instead of commit
cvs --help-synonyms
// History: Examining an edited file
cvs -q log gobj.h
// Comparing different versions.
cvs diff -r 1.1 -r 1.3 gobj.h
// Reverting to a previous version.
cvs update -j 1.2 -j 1.1 myglutgui.h
cvs ci -m "reverting changes" myglutgui.h
// Moving a file from one directory to another
// However the history is fragmented : cvs log fails
mv file target
cvs rm -f file
cd target
cvs add file
cvs commit -m '- moved file to target'
// Adding files and directories
cvs add newfile
cvs ci -m "new file added" newfile
mkdir d1
cvs add d1
- no need to commit
// Adding a binary file then turn off keyword expansion and line ending
// conversion.
cvs add -kb filename
// Disable keyword expansion
cvs add -ko filename
rm filename
cvs rm filename
cvs ci -m "removed filename" filename
// Deleting a directory
cvs rm file1 file2 file3
cvs ci -m "removed files" file1 file2 file3
rm directory
// in parent directory
cvs update -P .
// Creating the module proj
cvs import -m "initial import into CVS" proj zero start
// watches
cvs edit hello.c - notify everyone of edit, temporarily added as a
watcher, ends with a commit!
emacs hello.c
cvs watch add hello.c - set the watch
cvs watch remove hello.c - remove the watch
cvs unedit hello.c - back off and revert
cvs watch add -a commit hello.c - only notified of commits
cvs edit -a none README.txt - asked not to be added as a watcher.
cvs watchers
cvs editors
// Turn on watches project wide.
cd proj
cvs watch on
// Getting Rid of A Working Copy
// in proj
cd ..
cvs release proj
cvs release -d myproj // delete the tree
//Branches in CVS cvs tag release-1 . // Other developer wants to check out release-1 cvs checkout -r release-1 project // Release a development tree cvs release -d project // Branch off release-1 cvs rtag -b -r release-1 release-1-1 project cvs checkout -r release-1-1 project // Merge branch back into the main tree // Release cvs release -d project // Merge cvs checkout -j release-1-1 proj cvs commit -m "Merged release-1-1 with the current version"
cvs ci -m "update the project html page" update.shcvs ci -m "update the project html page"
cvs add *.h. However I have not
got such an easy solution with cvs rm *.h as it complains
that the files are still in the directory.
-n option. Examine the output to see
if cvs behaved as expected.
cat temp | cvs rmcat temp | xargs cvs rmcvs rm fred.h fred2.hls *.h > /tmp/tempmv *.h ..
cat /tmp/temp | xargs cvs rm
How do I move the latest revision on my working branch directly onto the trunk?
Must merge. Always messy. For a single developer branch off releases and have the main trunk as the development environment.
How do I reverse a checkout?
CVS is state driven so use another checkout. For example delete the directory and check it out with the previous dir.
How do I delete the reoccurring tmp directory?
Each file has a version. When branching each file changed
is part of a files version history.
cvs status d2partition.h
gives the version. To find out which versions are associated with which
branches I am not so sure.