Cvs
From WxWiki
For the full description of how to use CVS please see the Using CVS page on the main wxWidgets website. You can easily access the repository from your web browser using the wxWidgets ViewCVS.
When you're uploading binary files to cvs, remember to read Binary Files.
For information on how to use svk to cache your CVS, look at this: svk
Contents |
[edit] Building
The information on how to build all the CVS files is in a file named BuildCVS.txt in the root directory.
[edit] About -z
As the server on which cvs resides doesn't have a whole lot of CPU power, please use -z1, not -z9
[edit] Using wxWidgets CVS in a nutshell
To keep things simple, I'll assume you are using some flavor of UNIX and that you already have a directory named "devel" inside your UNIX home directory where you store all of your development files. I'll also assume your prompt is of the form "machinename:/path/you/are/in username$ " I will show how to check out both the stable 2.4 branch and the HEAD (2.5) branch. Where instructions are nearly identical I will only show the instructions for 2.4 (use your imagination).
First, open a terminal window and change to the devel directory.
machine:~ user$ cd devel
Next, make a directory where you will store everything related to a particular branch of wxWidgets and change into it.
For wxWidgets 2.4 series:
machine:~/devel user$ mkdir wx24cvs machine:~/devel user$ cd wx24cvs
For wxWidgets CVS HEAD (2.5 series):
machine:~/devel user$ mkdir wxHEADcvs machine:~/devel user$ cd wxHEADcvs
The first time you use a particular CVS root you must "log in" to it. You only have to do this once because your password is stored in ~/.cvspass and is valid whenever you conect to the same CVS root (the value of the -d option).
machine:~/devel/wx24cvs user$ cvs -d ':pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets' login (Logging in to anoncvs@cvs.wxwidgets.org) CVS password: anoncvs
Now that you're "logged in" you'll want to check out the source.
For wxWidgets 2.4 series:
machine:~/devel/wx24cvs user$ cvs -d ':pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets' checkout -r WX_2_4_BRANCH wxWidgets
For wxWidgets CVS HEAD:
machine:~/devel/wxHEADcvs user$ cvs -d ':pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets' checkout wxWidgets
There will probably be some delay and then you'll see messages indicating your CVS client downloading the wxWidgets source for every directory in the CVS tree.
Now let's see if we got everything:
machine:~/devel/wx24cvs user$ cd wxWidgets machine:~/devel/wx24cvs/wxWidgets user$ ls -l
You should see a number of directories and files listed. You now have a checked out copy of wxWidgets and only need to update it from here on out. At a later time you would issue the following commands to do so:
machine:~ user$ cd devel/wx24cvs/wxWidgets machine:~/devel/wx24cvs/wxWidgets user$ cvs update -Pd
You will see a listing of directories in the wxWidgets CVS tree much like you did when you performed the initial checkout.
The real benefit of CVS comes when you have local changes to your files. To output a listing of all changes you have made to your local copy into a file which you can open with the text editor of your choice, issue the following command:
machine:~/devel/wx24cvs/wxWidgets user$ cvs diff -u > ../my_wxWidgets_diff.txt
That will make a file ~/devel/wx24cvs/my_wxWidgets_diff.txt which will show you a unified diff of your changes. Unified diffs by default show 3 lines of context above and below any change so you can get a feel for where they occur in the file without necessarily having to look at the original. Unified diffs are also the preferred format for wxWidgets patches because they are easier to apply to a file which has been changed by someone else after you generated the diff.
As this is intended to be a simple guide to CVS I'll avoid talking about other CVS features and refer you to the official wxWidgets CVS page. For more advanced usage of CVS consult the Cederqvist manual.
[edit] Using Bakefile and autoconf (does not apply to wxWidgets 2.4.x or older)
From time to time a developer will commit changes to the Bakefiles and neglect to rerun Bakefile and/or autoconf. If you are serious about tracking CVS, these two tools are must haves. Bakefile is available from http://bakefile.sourceforge.net/. Autoconf is included with almost all UNIX or UNIX-like platforms, including MinGW's MSYS.
When using Bakefile it is not necessary to rebake the files for all targets, just the ones you require. The bakefile and bakefile_gen commands provide a -f flag for this. For example:
machine:~/devel/wxHEADcvs/wxWidgets/build/bakefiles user$ bakefile_gen -f autoconf
The above command will generate the library Makefile.in as well as all of the samples Makefile.in and update autoconf_inc.m4 as necessary. It will not generate makefiles for MSVC, Borland, Watcom, or anything else. It also means you only have around 140 files to generate rather than 800-900. You will find the list of formats inside the <add-formats> tag in build/bakefiles/Bakefiles.bkgen.
After running bakefile_gen a few times you may notice that it tells you which files it is using for input. If you only want to generate the main library project file or makefile you only need run bakefile wx.bkl. The -f flag also works for Bakefile itself. For example:
machine:~/devel/wxHEADcvs/wxWidgets/build/bakefiles user$ bakefile -f autoconf wx.bkl -o../../Makefile.in
The above command will generate the library Makefile.in and update autoconf_inc.m4 if necessary.
If autoconf_inc.m4 was written to by Bakefile you should rerun autoconf.
machine:~/devel/wxHEADcvs/wxWidgets user$ autoconf
