2001-03-26
Revision History | ||
---|---|---|
Revision 1.1 | 2001-03-26 | |
Slight changes by stpeter. | ||
Revision 1.0 | 1999-08-31 | |
First version. |
A quick start to using the Concurrent Versioning System on Jabber.org's server. Written for Jabber developers.
If you don't have a CVS account on the Jabber.org server, you can log in as an anonymous user and checkout CVS code. The process is very similar to the steps for logging in with a user name. Just put in "anoncvs" as your user name and your password, as shown below:
cvs -d :pserver:anoncvs@jabber.org:/home/cvs login
cvs login
at password prompt, type: anoncvs
To create the CVS account information, you will need to login to CVS only once using your username/password. It will retain you information for further commands issued. To do this, type this at BASH prompt while connected to the Internet:
cvs -d :pserver:userid@jabber.org:/home/cvs login
You will then be logged into CVS. Your password information will be stored in the .cvsrc file in your home directory. Optionally, you can set an environmental variable names CVSROOT like this:
export CVSROOT=:pserver:userid@jabber.org:/home/cvs
This will prevent you from having to specify the -d with every command. (Do it, it's much easier). Now you can log in to the system:
cvs login
at password prompt, type your password
You should be able to get pretty far with just anonymous access using anoncvs@jabber.org as your username. However, if you need to commit changes to code or documentation, contact one of the core developers listed on the Team Page.
To view the list of available modules, just type:
cvs co -c
Note that the module list needs to be updated manually, so you may not see the module you're looking for when you type 'cvs co -c'.
Now that you are logged in and know the name of the module that you want, you can check out a module -- for example, type "jabber2" for the latest server code. Start by going to the directory that the module's sub-directory will be off of. To get the module from the server, type:
cvs -z3 checkout jabber2
(The -z3 switch tells cvs to use some basic compression. This is not necessary, but it will make the checkout faster. "jabber2" is the name of the module you are checking out.) Bingo, watch the files scroll by as they are downloaded.
Now that you have the files from the server, you can make your changes. Every once and a while, you can issue the command:
cvs -z3 update -dP jabber
This will update the jabber directory and merge any changes made to CVS since your last checkout/update. It is advisable to do this before you check in to make sure no one's broken something that you need. The -dP tells it to delete files that have been removed, and to Prune directories. To check your changes back in, type:
cvs -z3 -e pico commit jabber
This will check in your changes, and launch pico to annotate the ChangeLog with your changes. You can specify an editor as an environmental variable using CVSEDITOR, and not need to specify it at all. (IF YOU DO NOT USE -e, and you DO NOT have the environmental variable set, I hope you like vi, because that is where you're going.)
All of the above update/checkin commands CAN be done within the jabber tree without specifying jabber on the command line. E.g., if I'm in /home/tcharron/jabber/clients/win32 (this is where I do my editing), I can simply type "cvs -z3 update" to update the current directory ONLY, or "cvs -z3 commit" to check in the changes in the current directory ONLY (yes, it does recurse sub-directories).
It should also be noted that new files are not automagically added to cvs as you create them. They need to be added with a cvs add command. If they are not in cvs, and are not in the .cvsignore file (more on that in a second), they will appear with a "?" next to their name during check in. It means CVS does not know what the to do with them (which explains, the "?", now doesn't it).
Important: IF THE FILES that you WISH TO CHECK IN are BINARY FILES, you need to ADD them with THESE FLAGS!!
cvs -z3 add -ko -kb somepic.bmp
The -ko and -kb switches specify that this is a BINARY file and NOT a text file. BAD THINGS will happen to your files if you try to add them without these flags. (Well, I'm not sure if it's THAT BAD, as I've never DONE it myself.)
There is one special file that can exist in each directory names .cvsignore. This file contains all of the Files and/or directories that CVS should completely ignore. In my case, I have these directories in the win32 directory:
/home/tcharron/jabber/clients/win32/Release
/home/tcharron/jabber/clients/win32/Debug
My .cvsignore file looks like this:
---.cvsignore--- Release Debug
Pretty easy. REMEMBER, you should also ADD the .cvsignore file TO CVS, a.k.a.:
cvs -z3 add .cvsignore
Copyright (c) 2000, Thomas Charron.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to
The Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307,
USA
Copyright (C) 2000, Thomas Charron.
All sample code included in this document is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You may obtain a copy of the GNU General Public License from the Free Software Foundation by visiting their Web site or by writing to
The Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307,
USA