Information about CVS (How do I use it?)
This is a very little introduction how CVS works and how you should and can
use it. Please also read the documentation of CVS.
-
Note: This description mainly covers the command line
version of CVS. However, if you are using a GUI version, the steps are the
same, but there might be some differences and problems.
-
All CVS commands require a connection to the CVS server.
-
Get CVS for
your platform and install it. Please be sure to use at least version
1.10. Do not use CVS under different platforms on the same work
source tree!
-
Recommended settings for CVS (add to .cvsrc in your home directory):
cvs -z3
checkout -P
update -P
diff -c
-
Login into the CVS Server:
-
If you are a member of the BinkleyTerm-XE Team by Sourceforge you
are able the access the CVS tree by SSH. This secure access login
procedure is a little different from the 'normal' login. Read the
instructions on the
Sourceforge pages and see the
Sourceforge documentation project.
-
If you are not a member or only want to try CVS, you can use the
anonymous login. Go to the
CVS Repository page for more information.
-
Text mode version (for user anonymous):
-
Set the environment variable CVSROOT to
:pserver:anonymous@cvs.btxe.sourceforge.net:/cvsroot/btxe
-
Type cvs login to "login" the CVS Server. CVS will ask you
for a password that will be checked and stored if it is correct. But
for this anonymous connection it is enough to press the enter key and
leave the password field blank.
Note: Login here does not mean that you're holding a
permanent connection to the CVS server. A new connection will be
established everytime when required.
-
GUI version:
- Set up CVS to use PServer
.
- Set User Name to anonymous.
- Set No Password.
- Set CVS Module to btxe.
- Set CVS Server to cvs.btxe.sourceforge.net.
- Set CVS Repository to /cvsroot/btxe.
Get your work source tree:
-
Type cvs co btxe to checkout the latest version of the btxe
source tree. A new directory btxe will be created in the current
directory containing the sources.
-
If you want to checkout an earlier version, type cvs co -r
<tag> btxe and you will get Beta-<tag>, i.e.
cvs co -r XH3 btxe will checkout Beta-XH3.
The btxe repository currently holds all versions since Beta-XH2 aka
Gamma-6 (XR6) including the patches between the betas.
Do your modifications:
-
Please group them together to match one log message. Do not do thousands
of completely different modifications that do not depend on each other.
As CVS saves the log message you enter with every file you have modified
it is not very clever to do a long list of changes.
I.e. if you want to implement a new feature and fix a bug in an already
existing module that is independent to the new feature, first fix the
bug and commit the changes (see below) and then implement the new
feature.
-
Use gnu indent on the sources you have modified to make sure they match
the style guide! This is important because if two developers do the same
changes, CVS can resolve this only if they are really identical.
Indent also really helps keeping the source readable. Please read
stylguid.txt in the source tree for more details.
-
Make sure your sources are compileable!
To see what you or others have changed:
-
If you want to review the changes you have done type cvs diff.
This will create a diff file. If you are using the above settings it will
create a context diff which is IMHO easier to read.
-
You can also use cvs diff <file(s)> to only see the
changes of the file(s) you have specified.
-
If you want to see the changes done from one revision to another use
cvs diff -r <rev1> -r <rev2> [<file(s)>]
where <rev1> and <rev2> can be tags (i.e.
XH3)
or revision numbers (i.e. 1.2).
Update your work source tree:
-
Type cvs up in the root directory of your work source tree to
update it. This is only necessary when other developers committed
changes.
-
If there were conflicts, you will be notified by CVS and you have to
resolve them by hand. CVS will save the two conflicting parts and mark
them for you.
Commit your changes: (only non-anonymous users)
-
Type cvs ci [<file> [...]] to commit your changes. If
you use cvs ci in the root directory of your work source
tree, all modified files will be committed.
-
You will be asked for a log entry. Please read the notes in the template
and enter a detailed description. This description will also be used in
the changes.log which is added to xe_hist.doc before a new beta
release.
Note: if you are using a GUI version of CVS that does
not use "CVS:" to mark comments in a template, you must
remove all lines starting with "CVS:" by hand.
-
If you forget to update and another developer committed changes to the
same file, your commit will be rejected.
If you find errors or have suggestions, please
let me know!