 |
 |
|
 |
 |
 |
source code via cvs
In addition to the other methods, the
Mozilla source code is available via CVS.
What's CVS? CVS is the Concurrent Versions System.
Start at
Cyclic Software's pages to learn more.
Anyone can check out the sources via CVS, while only certain
people have the ability to check in (those people, basically, are
the module owners and their delegates.
More details on this will be forthcoming.)
To check out the sources, you need to be running CVS 1.9 or
later, and have your $CVSROOT set to
:pserver:anonymous@cvs1.mozilla.org:/cvsroot
The password for user anonymous is anonymous.
|
NOTE: We eventually plan to have a number of
frequently-updated read-only mirrors of our CVS server. Today,
there is just the one, and it's not a particularly powerful machine.
In order to make our current CVS server usable, we have instituted a
limit of 8 simultaneous users; if that many people are connected, others
will get a rejection message. This limit will be raised or eliminated
when we get our beefy new servers online.
We're hoping to have the new machines online in the first week of
June. The machines have arrived, but they aren't yet installed or
configured, as the fates have been conspiring against us. Stay tuned...
|
What follows are more in-depth instructions on two topics:
- First, detailed platform-specific
instructions on how to check out the source repository from scratch.
- Second, assuming you have previously
downloaded the source code from our FTP server, how to convert your
existing source directory into one that can be used with our CVS server
(meaning you will only need to download the files that have changed since
the FTP archive was constructed, rather than downloading the whole thing
again.)
cvs checkout
Here is how you do a cvs checkout from our server on various platforms.
Note that following these instructions will cause only the platform
specified to be updated. To get the entire source tree all 1.5 million lines;
all 149 megabytes of source code, replace MozillaSourceUnix with
mozilla in the instructions.
Also note that CVS is slower than FTP.
So, please read this entire document, including the
conversion section, before doing anything rash.
- Unix:
You can find CVS 1.9 at cyclic.com's
Unix pages.
You check out as follows. (Syntax is for csh; if you use sh, I'm sure
you'll know what to do. If you don't, you've got bigger problems...)
|
% setenv CVSROOT :pserver:anonymous@cvs1.mozilla.org:/cvsroot
% cvs login
(Logging in to anonymous@cvs1.mozilla.org)
CVS password: anonymous
% cvs -z3 checkout MozillaSourceUnix
cvs server: Updating mozilla
U mozilla/CHANGES.html
U mozilla/LEGAL
U mozilla/LICENSE
U mozilla/Makefile
...
You only ever need to run cvs login once.
It will remember anonymous's password in your $HOME/.cvspass
file.
The -z3 parameter is to cause the files (and diffs) to
be compressed while in transit. This is almost always the right thing to
do; so much so that you should probably just put
cvs -z3 in your $HOME/.cvsrc
file, to make it be the default on all CVS commands.
(Note that -z9 offers a logarithmic improvement in compression
at an exponential cost in CPU time. Therefore, we recommend -z3;
that seems to be about optimal in most cases.)
- Windows:
Note: In order to use cvs under windows, you must have unpacked the source
from the 'tar' file, not a 'zip'. The zip file format does not store dates with
enough accuracy for cvs so updating source unpacked from a zip with cvs takes a really
long time because the cvs client must send most files to the server to determine
if they have changed.
You can find CVS 1.9 at cyclic.com's
Windows pages.
The checkout procedure is basically the same as for Unix:
|
C:\> set CVSROOT=:pserver:anonymous@cvs1.mozilla.org:/cvsroot
C:\> cvs login
(Logging in to anonymous@cvs1.mozilla.org)
CVS password: anonymous
C:\> cvs -z3 checkout MozillaSourceWin
cvs server: Updating mozilla
U mozilla\CHANGES.html
U mozilla\LEGAL
U mozilla\LICENSE
U mozilla\Makefile
...
If the -z3 parameter doesn't work, that means you don't
have cvs and/or gzip installed correctly. Your life will be much easier if
you correct this, rather than omitting that parameter.
You also need to have the HOME environment variable
set to a sensible directory, or Cvs will complain.
Note: some Windows users report that using the -z option causes
the cvs process to never complete: it will finish the checkout, and then
get stuck at the very end. We don't know why this happens; it would appear
to be a bug in the Windows version of CVS. In any event, it seems to be
non-fatal since it only gets stuck after everything has been successfully
checked out.
- Macintosh:
We know of two CVS options for Macintosh that work with our CVS server:
those are ``MacCVS Pro'' and
``MacCVS.'' Despite the
similar names, the two packages are unrelated.
MacCVS Pro is a GUI program, while MacCVS is a command-line program
that works with MPW, and behaves more like the Unix and Windows CVS clients.
- To use MacCVS Pro:
- Download it from
maccvs.org.
Then get the pre-made
session file; and follow the instructions in the enclosed file,
``How to check out.''
Note that MacCVS Pro does not support the -z3 parameter
for compressed transfers, which means that your checkouts will be
painfully, glacially, unconscionably slow.
- To use MacCVS:
- Download it from digapp.com.
You need version 3.1a7 or later (earlier versions won't work.)
Then do the following:
- Install the MPW CVS tool:
Copy cvs (a MPW tool) and cvs2.Lib
into your MPW Tools folder;
- Set some environment variables inside MPW:
|
set CVSROOT ':pserver:anonymous@cvs1.mozilla.org:/cvsroot'
set USER 'anonymous'
set CVS_GETPASS 'anonymous'
set MAC_DEFAULT_RESOURCE_ENCODING AppleSingle
export CVSROOT
export USER
export CVS_GETPASS
export MAC_DEFAULT_RESOURCE_ENCODING
- Log in into CVS from inside MPW (you only need to do this
once):
cvs login
- Check out the tree:
cvs checkout mozilla
Note that, like MacCVS Pro, MacCVS does not support the
-z3 parameter for compressed transfers, which means
that your checkouts will be painfully, glacially, unconscionably slow.
- Other Mac CVS tools:
- There are a few different CVS options for MacOS listed on
cyclic.com's Macintosh
pages, but I don't currently know which, if any, of these work with the
mozilla.org cvs server. The beatings will continue until answers are found.
Thank you for your patience.
- OS/2:
You can find CVS 1.9 at cyclic.com's
OS/2 pages.
The checkout instructions for OS/2 are identical to those for Windows,
above.
There is one detail, however: currently, the most recent OS/2 code for
Mozilla is not (yet) on the trunk of the CVS tree: it is on a branch. So,
if you are doing OS/2 development, you probably want to check out that
branch instead. You do that like so:
C:\> cvs -z3 checkout -r OS2_BRANCH mozilla
See the CVS
documentation for more information on how branches work.
converting a tarball to a working cvs sandbox
Chances are, you've already downloaded the source code from our
FTP server (or one of its many
mirror sites). Even if you haven't, you might
want to consider doing so: it's faster than checking out the whole tree
over CVS. This section explains how to make your previously-downloaded
source directory be usable with our CVS server.
Our source tarballs contain CVS info. If you have a tarball dated
1998-04-29 or later, it is already set up to talk to cvs1.mozilla.org.
All you need to do is:
- download a tarball;
- unpack it;
- set $CVSROOT;
- and run cvs update in that directory.
This will cause the server to send the changes that have been made
in the CVS repository since the time the tarball was created.
However, if you have already downloaded one of the older tarballs
(there have been two: 1998-04-08 and 1998-03-31) then life is not quite
that simple...
The problem is, the first two sets of tarballs were created before our
CVS server was set up; and also, before we renamed the top-level ns
directory to mozilla. So, in order to unpack one of those older
tarballs and then do a cvs update, you will need
to take the following steps.
Again, note that these steps are not necessary if you have
downloaded a tarball dated 1998-04-29 or later. These steps are only
necessary if you already have the 1998-04-08 or 1998-03-31 tarballs.
Rename the ns directory to
mozilla;
Munge the contents of the Root and
Repository files in the approximately 500 CVS
directories to point to correct CVS server and root directory.
You can do that by running the mungezilla
Perl script. If you are on Unix or Windows, run it like so:
% perl mungezilla -R -d mozilla
where mozilla is the name of your mozilla
directory (the one that used to be named ns.)
On MacOS, just launch it. It will prompt you for the location of
the source.
Beware: make a backup first. This script has not been heavily
tested; we think it works, but if it causes you to lose your work,
that's your fault. Be careful.
If the mungezilla script doesn't work
for you, then I guess that means you're out of luck, and you'll have to
check out the whole tree from CVS; or, preferably, download a newer
source drop than the 1998-04-08 tarball, and then update based on that.
Now you should be able to update from the CVS server:
% cd mozilla
% cvs -z3 update -dP
cvs server: Updating .
P client.mak
P makefile.win
cvs server: Updating base
U base/Makefile
U base/makefile.win
...
That should pull in all the changes made since the tarball was
constructed (including all of the Makefile changes that go along with
the renaming of the ns directory to mozilla.)
Good luck!
|
|
 |
 |