
Using CVS
About CVS |
Where to find CVS and docs |
Setting up CVS |
Initial download |
Updating from the repository |
Committing edited files |
Adding and deleting files |
Modules |
Tags
CVS is a version control system that allows developers to update a central repository
via the Internet. It is being used for wxWidgets 2 by the core developers.
The CVS repository is hosted by
dotsrc.org.
Administration is carried out by
Robin Dunn.
Unlike some other systems, CVS doesn't require you to 'check out' files before they're edited
(although this can be done optionally). It tries to merge changes, and if it can't
resolve a conflict, will flag the problem and let humans resolve it.
For the wxWidgets team, CVS removes the bottleneck caused by one person per port accepting modifications
and releasing occasional distributions. Also, users can download the very latest
source from the CVS repository. This has implications for stability, so
tested releases will still be needed.
You can get the latest snapshot of the CVS sources
here.
The script which compiles the library is run every night (local time,
GMT+1) and the results of the last run are shown on the page.
It may also be useful to check that the sources could be compiled successfully
by looking at the
daily
rebuilds page before downloading the snapshot.
If you would like to have write access to the wxWidgets repository, please contact
Robin Dunn.
Anonymous read-only access to the repository is available to everyone (see below for
a description of how to set it up).
You can also directly browse the CVS sources.
The complete repository can be checked out as wxWidgets.
For a list of modules, see Modules.
These notes about CVS are very brief and cover only the commonest operations. For more
information, please see the references below.
You can either set up some environment variables, or pass the user id and project directory to cvs
using switches. The environment variables for DOS/Windows are:
set CVSROOT=:pserver:ID@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets
set HOME=c:\home
set CVS_PASSWORD=mypassword
where ID is replaced by your username. For anonymous login (read-only), use anoncvs for
the login and anoncvs for the password. Setting the CVS_PASSWORD variable is optional
(and obsolete with some versions of CVS);
you can login explicitly instead with
cvs login ID:
cvs -d :pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets login
cvs -d :pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout wxWidgets
If you do not want to use the CVSROOT variable, you can pass this to cvs:
-d:pserver:ID@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets
Even people with write access should also use the Patch Manager for big or
controversial changes so they can be discussed on wx-dev before
being committed.
You can get notifications whenever someone updates a file in CVS, by clicking
here.
Change directory to your wxWidgets directory, e.g. c:\wx2, and type:
cvs checkout wxWidgets
(Add -d options to the above as necessary). This will create a wxWidgets directory below c:\wx2. The checkout command only needs to
be done once.
You may wish to keep two copies of the repository - the current stable branch plus the trunk (the development
'sandbox'). By default, the trunk will be checked out. If you want to check out the trunk as well as a branch, such as WX_2_6_BRANCH,
use:
% mkdir \wx2dev
% cd \wx2dev
% cvs checkout wxWidgets
% mkdir \wx2stable
% cd \wx2stable
% cvs checkout -r WX_2_6_BRANCH wxWidgets
You can now work in either tree without passing any extra parameters to the cvs command, and
updates will happen in the correct branch.
To make your files reflect what's currently in the repository:
cvs update
This isn't always sufficient, however. If new files have been added, you may need to
use the -d option to get the missing files. If you want to remove empty directories,
use the -P (prune) option.
The directory you're currently in determines
which directories will be updated, so to make sure you have all files, do the following:
cd d:\wx2\wxWidgets
cvs update -d
If you wish to get a particular version of the file (say you've added a bad change and want to
scrap it), you can do this:
cvs update -r1.78 textctrl.cpp
This sets the 'sticky' tag, which means that all your subsequent
updates will retrieve that revision until you update with
cvs update -A textctrl.cpp
In this example, to revert the changes in textctrl.cpp revision 1.79, you can
update with -r1.78, copy the file to textctrl.bak,
then update with -A, copy textctrl.bak to textctrl.cpp, and commit again.
After making changes to files, go to a directory which you wish to be committed
(the top-level wxWidgets directory if you wish to commit all changed files) and type:
cvs commit
This first does an update, then commits your changes. Note that this will commit all
files below the current directory, so if you wish to add a comment for a particular
file, change to the appropriate directory and then do the commit for this directory or
an individual file.
Add files and directories to the repository with:
cvs add filename # for an ASCII file
cvs add -kb filename # for a binary file
If you forget to add the file with -kb, you can make it binary later with e.g.:
cvs admin -kb filename
cvs update filename
copy uncorrupted_file filename
cvs commit filename
To remove a file, delete it and then type:
cvs remove filename
or delete the contents of a directory and then remove the whole directory
(you don't have to remember the individual filenames then).
The wxWidgets CVS repository makes use of the module facility,
whereby you can refer to sets of files by module names.
The wxWidgets modules are as follows:
- wxGTK - everything for the GTK port (including common/generic code)
- wxMSW - everything for the Windows port (including common/generic code)
- wxMac - everything for the Mac port (including common/generic code)
- wxOS2 - everything for the OS/2 port (including common/generic code)
- wxDocs - the documentation source in Latex format
- wxEtc - samples, utilities and the user directory
- wxWidgets - all of the above (attention: be prepared to download a few hundred megabytes)
To check out a branch, use e.g.
cvs co -r WX_2_6_BRANCH wxWidgets
These are the important branches:
- WX_2_6_BRANCH: the current stable branch from which the 2.6.x series are
being released. Only binary and source compatible bug fixes should be checked
into this branch.
- WX_2_4_BRANCH: the old stable branch from which the 2.4.x series were released.
It is possible that another 2.4 release is done some time later if there is
sufficient interest in it.
- WX_2_2_BRANCH: the very old stable branch, there are no chances of more 2.2
releases any more.
- HEAD: the cvs trunk which is used as development branch, where binary and
source compatibility is not such an issue. 2.7.x development snapshots will be
made from this branch and it will become WX_2_8_BRANCH in the future.