![]() |
|
||||||||||||
| CVS
|
|
|
|
WinCVS and other Tips
CVS hangs on large binary files
Preference globals tab, enable Use TCP/IP compression.
This only compresses data transfered between the client and server.
However, it seems to be a workaround for transfer hangs of certain
binary file types that occur when compression is not enabled.
This may be a bug in WinCVS that may be fixed in a later version.
I have not seen Linux, or MacCVS have this problem.
Re-adding a file
Performing a CVS remove file command does not elimiate all
traces of it from the repository. If at some later
time the file is re-added, the Attic/filename,v with
dead state is moved to filename,v
and given an exists state in the CVS repository.
Now because MS Windows is somewhat case insensitive, a problem
can arise if the re-added file is the same name with
slightly different case letters. The symptom of this is that
a re-added file can't be commited because the exact case
sensitive Attic/filename,v can't be found. To resolve this,
either attempt to guess what the file case originally was,
or gain access to the CVS repository and look in the Attic
for the exact case spelling of the file, then re-add and commit
should work.
WinCVS - files are present but don't show in window!
This is a fun one. Sometimes, without warning WinCVS will startup
with a View Filter settings set strangely. The Show Changed
setting if disabled will hide all files WinCVS view window!
Check this setting and other similar ones to make sure you are seeing everything
you expect to see. Be carefull, the settings are very subtle and can be very
misleading!
CVS Tagging Tutorial
CVS Tag History --------------- C2010101 ntree control functional C2000102 rename ntree.cpp -> ntree.c C2000101 some INI capability C2000000 First check in of Gus's 'classic' code
Branch/Update/Merge Tutorial
| Make a clean checkout of a known working module.
Often you may look at a past tag of a project and
checkout a specific tagged state of it clean to insure that
you have a good base to work from.
If you decide not to create a branch, you can do an update with the clear sticky bit to freshen your working directory with the main trunk files. Now, create a branch. On WinCVS, in the left pane right click on the module root you want to branch, Tag Selection, Create branch. Make sure you use no spacees or other nonalphanumerics (e.g. BRANCH1). OK, now the CVS repository has a notion that BRANCH1 is a sperate code state from the main trunk, even though at the moment they represent the same file state. Even though BRANCH1 may seem like a normal tag, it actually refers to the tip of the branch just created. As commits of changes to the branch's files occur, the BRANCH1 tag will move forward to always represent the tip of the branch's file state. If you need to mark a certain file state, use the standard tagging proceedure. From this point on, a seperate file state will be maintained for the files checked out to the branch work directory. Any changes checked in will not affect the main trunk. Ultimately you will finish tweaking the branch files, check them into the branch, and decide that the branch needs no more work. At this point its time to merge/join the branch changes into the main trunk. At some point you may decide that you still need the branch to work in, but some changes in the main trunk have occured that you would like to pull into you branch. This is tricky. |
# cvs update -A
...
# cvs tag BEFORE000
...
# cvs tag -b BRANCH000
...
# cvs update -r BRANCH000
...
# vi ...
[ change some files in the branch ]
# cvs commit
...
# cvs update -A
...
# cvs update -j BRANCH000
[ merge, hope it works! ]
# cvs -n update
[ this will show which files have been merged ]
# cvs commit
[ beware - merging changes from a
branch doesn't also add/remove files ]
...
# cvs tag AFTER000
... |
Advanced Branch/Merging
| So you used a branch, did your development, then merged it back into the main trunk. You need to do some more development isolated from the main trunk. Classic proceedure would be to checkout a fresh version of the trunk (remove sticky tags), then create a new branch, then update to the branch. However, you want to be clever. You already have a branch, just it has just been merged to the trunk once already. There is a way to keep developing in the old branch and merging only recent change to the trunk - but you need to be CAREFUL! Make sure you have a tag in the branch at the point which was previously merged to the trunk. Next time you merge the branch to the trunk, specify TWO -j options. This will restrict the merge to only changes made since the last merge of the branch was performed. If you skip the second merge option, the merge will be confused as it will try and undo/redo changes that have already been merged into the trunk. | # cvs update -r BRANCH000 -AdR
# cvs tag BRANCH000MP1
[ tag the current state which has already been merged to trunk ]
# vi ...
[ change some files in the branch ]
# cvs commit
...
# cvs update -A
...
# cvs update -d -j BRANCH000MP1 -j BRANCH000
[ merge ONLY the latest changes, hope it works! ]
# cvs -n update
[ this will show which files have been merged ]
# cvs commit
[ beware - merging changes from a
branch doesn't also add/remove files ]
... |
Common CVS Commands
| WinCVS (circa v1.2) | Classic Command Line (Linux) | |
| environment prep |
|
|
| login | Menu: Admin: login |
|
| tag | hilite file or folder
Menu: Modify: Create a tag on selection ... New tag name: BOGUSMOD20010909_FIXED_FOOBAR |
$ cvs -q tag BOGUSMOD20010909_FIXED_FOOBAR |
| checkout | ... | $ cvs co module
(this will create a 'module' directory) |
| update | ... | (cd to 'module' directory, e.g. $ cd module)
$ cvs update -R -d |
| update sticky |
...
Sticky options - Retrieve rev /tag/branch: TAG123 |
(cd to 'module' directory, e.g. $ cd module)
$ cvs update -rTAG123 $ cvs update -D "14 Jan 2008 19:50:00" |
| update remove sticky |
...
Update options - Reset any sticky ... |
(cd to 'module' directory, e.g. $ cd module)
$ cvs update -A |
| update non-destructive |
N/A ? | (cd to 'module' directory, e.g. $ cd module)
$ cvs -n update |
| commit | ... | $ cvs commit somefile.txt |
| To commit all change in a directory and below omit the file name. New files require cvs add ... before commits will acknowlegde them. Remember, to use -ko -kb when adding binary files! | ||
Dangerous But Useful Commands
cvs admin -o ...