|
|
Auth |
These are my notes on how to do obscure things in CVS.
Finding which file to recover:
cvs -d cvsroot co -c (does not show "undefined" modules)
cvs -q rlog -R path, add -l for non-recursive
cvs rlog fullPathToFile, add -N to not show tags
Once you know the file name and revision: To retrieve aDir/bDir/j.java, revision 1.3:
cvs up -d -l aDir, then cvs up -d -l aDir/bDir, etc.
cvs up -r1.3 aDir/bDir/j.java
To create a new repository:
cvs -d :local:repository_path init
To create a new module (top level directory)
cvs -d cvsroot checkout new_top_level_dir
cvs add etc.
To import existing code cleanly:
cvs checkout (see previous case).
CVS folder from the temporary directory to the one that has
the existing code.
cvs add to add all the existing files to the repository.
To incrementally merge changes/adds/deletes made on one branch to another branch:
cvs update -P -d -jbegin_tag -jend_tag
cvs commit
To move all the changes made in one branch onto another branch (overwriting whatever was there):
cvs export to it, but it doesn't seem to work (any more)
windiff. Copy, cvs add, cvs remove.
Tip: cvs remove -f * can remove a whole filesystem branch. Tip: to add
a whole filesystem branch, copy it from source to target, then perform surgery on the
CVS folders: update/add/delete Tag and delete everything in
Entries except the directory entries.
cvs commit
cvs add -kb foo.jar then cvs commit -r 1.3 foo.jar loses the
-kb flag (while cvs commit foo.jar does not).
cvs commit that was adding a lot of brand new files
seemed to leave many of the files with present timestamps instead of their original
timestamps, and possibly deleted some files. We're not sure how this happened but the
interrupted commit is the most likely culprit.
| Louis K. Thomas <louisth@hotmail.com> | Auth | 2004-07-01 (2882 days ago) |