Código fuente de Mozilla (CVS)

  • Enlace amigable (slug) de la revisión: Código_fuente_de_Mozilla_(CVS)
  • Título de la revisión: Código fuente de Mozilla (CVS)
  • Id de la revisión: 259002
  • Creada:
  • Creador: Blank zero
  • ¿Es la revisión actual? No
  • Comentario

Contenido de la revisión

{{wiki.template('Traducción', [ "inglés", "Mozilla Source Code (CVS)", "en" ])}}

Aquellos que hacen desarrollo de forma muy activa pueden chequear las últimas fuentes utilizando CVS. Este es el método preferencial si planeas realizar parches y arreglos, porque te permite los cambios de último momentos y unirlos con los tuyos.

Si buscas compilar para la liberación, sería mejor que mires Descargar el código fuente de Mozilla.

{{wiki.template(':es/Documentación_para_la_compilación/TOC')}}

Guía rápida

I seem to not be editing this page in what others on this development site deem appropriate. So, if you are going to just remove this section, can you please be so kind as to suggest an alternate title of a new page that I can put this information on? Thanks, Jeff Carr

La forma rápida para verificar las fuentes del tronco (inestable) de Firefox sería:

cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
cd mozilla
make -f client.mk checkout MOZ_CO_PROJECT=browser

Nota que en Windows, tu árbol fuente debe encontrarse en un punto de montura /cygdrive/<c> (por ejemplo, /cygdrive/c/src/mozilla or /cygdrive/d/another/path). No debe encontrarse junto con tu /home.

Comenzando

CVS siginifica "Concurrent Versioning System". Para conocer más sobre CVS en genral vista ???, o lee el tutorial.

Para saber como obtener la habilidad de realizar cambios. También puedes leer. Esas personas son dueños de módulos y sus delegados. Lee el docuento hacking mozilla para saber como obtener la habilidad de realizar cambios. También puedes leer using SSH to connect to CVS.

Requerimientos

Para ver las fuentes necesitas estar ejecutando CVS 1.11 o superior. 1.12.3 no funciona con el servidor CVS, pero 1.12.9 sí funciona. Además debes usar GNU make para ver y compilar Mozilla. No se acepta otro programa "make". En Windows, Mac y sistemas GNU (ej. GNU/Linux), utiliza "make" para ejecutar GNU make, en sitemas no GNU (ej Solaris) utiliza "gmake".

Configuración de cliente CVS

El "cvsroot" que se utiliza para acceder a CVS Mozilla de forma anónima es:

:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot

Si usas una interface CVS gráfica, utiliza la siguiente data:

  • host: "cvs-mirror.mozilla.org"
  • repository path: "/cvsroot"
  • user: "anonymous"
  • connection type: pserver
  • port: default (2401)

Selecting a Project to Pull

Since several different applications are built from the same basic source code, you must choose which application to checkout on the command line using the MOZ_CO_PROJECT variable. This information has to be supplied when it comes to the checkout of the actual source code (see the appropriate checkout section below, according to the branch you want to checkout). The possible options include the following:

browser 
The standalone "Firefox" browser.
mail 
The standalone "Thunderbird" mail/news client.
suite 
The traditional "Mozilla" SeaMonkey suite of browser, mail/news, composer, and other applications.
minimo 
The standalone browser for small devices.
composer 
The standalone HTML composer.
calendar 
The standalone "Sunbird" calendar app.
xulrunner 
The next-generation XUL application launcher.
camino 
The "Camino" native browser for Macintosh.
tamarin 
The Adobe Ecmascript virtual machine.
all 
Check out sources for all of the above projects, plus some additional utility code

Multiple projects can be specified with commas: MOZ_CO_PROJECT=suite,browser,xulrunner.

Note that if you are using a custom <tt>.mozconfig</tt> file, you can also specify MOZ_CO_PROJECT there, instead of including it on the command line.

Checking Out a New Source Tree

Check Tinderbox

Before pulling a tree, you should always check the appropriate Tinderbox to make sure that the codebase is not broken. If there are red tinderboxes, it is usually advisable to wait until they are green before pulling a tree.

Branch HEAD

To check out a new source tree from scratch, get the <tt>client.mk</tt> file which contains makefile instructions which are used to pull the rest of the tree:

$ cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk

Note: if you have already set up a <tt>.mozconfig</tt> file, you may also need to check out the following files:

Firefox 
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/browser/config/mozconfig
Thunderbird 
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/mail/config/mozconfig

Specific Branch

If you want to check out the source code of a specific CVS branch, use

$ cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r BRANCH mozilla/client.mk

instead. To, for example, pull the Firefox 2.0 development branch, replace BRANCH above with MOZILLA_1_8_BRANCH. For available branch tags in Mozilla, see CVS Tags.

The information on pulling project specific .mozconfig files as listed in the previous section apply to other branches than HEAD as well of course.

Checkout

After having chosen the correct branch, run:

$ cd mozilla
$ make -f client.mk checkout MOZ_CO_PROJECT=option,option

As mentioned above, if you are using a custom .mozconfig file where you have already specified the MOZ_CO_PROJECT variable, you do not need to repeat it here on command line.

Always use <tt>client.mk</tt> to checkout the Mozilla sources: do not check out the <tt>mozilla/</tt> module directly. Various subprojects such as NSS, NSPR, and LDAP C SDK are pulled from stable release tags, even when regular mozilla development occurs on the trunk.

Specific Time

If you want to check out the source code as it was at a specific time you can use the MOZ_CO_DATE variable. For example <tt>MOZ_CO_DATE="20 Oct 2006 17:00 PDT"</tt>.

This can either be added to your <tt>.mozconfig</tt> file, or specified on the command line, such as

$ cd mozilla
$ make -f client.mk checkout MOZ_CO_DATE="20 Oct 2006 17:00 PDT" MOZ_CO_PROJECT=option,option

Changing the Source Tree to a Different Branch

Branch HEAD

In order to update a source tree (be it branch HEAD or a specific branch) to latest branch HEAD, first run:

$ cd mozilla
$ cvs up -A client.mk

The -A option removes any "sticky branch" information, which leads to the effect that the tree is updated to HEAD.

Specific Branch

To update a source tree which was pulled from a specific branch, start with

$ cd mozilla
$ cvs up -r BRANCH client.mk

instead. Replace BRANCH by the tag of the branch you want to update.

Updating a Source Tree

To update your source tree simply do the following:

$ make -f client.mk checkout MOZ_CO_PROJECT=option,option

As always, if you use a custom .mozconfig file where MOZ_CO_PROJECT is already defined, you do not need to repeat it on command line.

Creating a Diff File

In order to create a diff of a single local file against the current file in the repository, use:

$ cvs diff -u8p FILENAME

See Creating a patch for more information.

Converting a Downloaded Source Tree

Downloaded source trees from mozilla.org (source tarballs) are already set up with CVS information, like a normal checkout. You can update these trees like normal trees to the latest code, without special action. See previous section on how to update a source tree.

interwiki link

{{ wiki.languages( { "en": "en/Mozilla_Source_Code_(CVS)", "fr": "fr/Obtenir_le_code_source_de_Mozilla_via_CVS", "ja": "ja/Mozilla_Source_Code_Via_CVS", "zh-cn": "cn/\u901a\u8fc7CVS\u83b7\u53d6\u6e90\u7801" } ) }}

Fuente de la revisión

<p>
</p><p>{{wiki.template('Traducción', [ "inglés", "Mozilla Source Code (CVS)", "en" ])}}
</p><p>Aquellos que hacen desarrollo de forma muy activa pueden chequear las últimas fuentes utilizando CVS. Este es el método preferencial si planeas realizar parches y arreglos, porque te permite los cambios de último momentos y unirlos con los tuyos.
</p><p>Si buscas compilar para la liberación, sería mejor que mires <a href="es/Descargar_el_c%c3%b3digo_fuente_de_Mozilla">Descargar el código fuente de Mozilla</a>.
</p><p>{{wiki.template(':es/Documentación_para_la_compilación/TOC')}}
</p>
<h3 name="Gu.C3.ADa_r.C3.A1pida"> Guía rápida </h3>
<p><span class="comment">I seem to not be editing this page in what others on this development site deem appropriate. So, if you are going to just remove this section, can you please be so kind as to suggest an alternate title of a new page that I can put this information on? Thanks, Jeff Carr</span>
</p><p>La forma rápida para verificar las fuentes del tronco (inestable) de Firefox sería:
</p>
<pre class="eval">cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
cd mozilla
make -f client.mk checkout MOZ_CO_PROJECT=browser
</pre>
<p>Nota que en Windows, tu árbol fuente debe encontrarse en un punto de montura /cygdrive/&lt;c&gt; (por ejemplo, /cygdrive/c/src/mozilla or /cygdrive/d/another/path). No debe encontrarse junto con tu /home.
</p>
<h3 name="Comenzando"> Comenzando </h3>
<p>CVS siginifica "Concurrent Versioning System". Para conocer más sobre CVS en genral vista ???, o lee el <a class="external" href="http://ximbiot.com/cvs/cvshome/docs/blandy.html">tutorial</a>.
</p><p>Para saber como obtener la habilidad de realizar cambios. También puedes leer. Esas personas son <a class="external" href="http://www.mozilla.org/owners.html">dueños de módulos</a> y sus delegados. Lee el docuento <a class="external" href="http://www.mozilla.org/hacking/">hacking mozilla</a> para saber como obtener la habilidad de 
realizar cambios. También puedes leer <a class="external" href="http://www.mozilla.org/cvs-ssh-faq.html">using SSH to connect to CVS</a>.
</p>
<h4 name="Requerimientos"> Requerimientos </h4>
<p>Para ver las fuentes necesitas estar ejecutando <a class="external" href="http://www.nongnu.org/cvs/">CVS</a> 1.11 o superior. 1.12.3 no funciona con el servidor CVS, pero 1.12.9 sí funciona. Además debes usar <a class="external" href="http://www.gnu.org/software/make/">GNU make</a> para ver y compilar Mozilla. No se acepta otro programa "make". En Windows, Mac y sistemas GNU (ej. GNU/Linux), utiliza "make" para ejecutar GNU make, en sitemas no GNU (ej Solaris) utiliza "gmake".
</p>
<h3 name="Configuraci.C3.B3n_de_cliente_CVS"> Configuración de cliente CVS </h3>
<p>El "cvsroot" que se utiliza para acceder a CVS Mozilla de forma anónima es:
</p>
<pre class="eval">:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
</pre>
<p>Si usas una interface CVS gráfica, utiliza la siguiente data:
</p>
<ul>
  <li><b>host</b>: "cvs-mirror.mozilla.org"</li>
  <li><b>repository path</b>: "/cvsroot"</li>
  <li><b>user</b>: "anonymous"</li>
  <li><b>connection type</b>: pserver</li>
  <li><b>port</b>: default (2401)</li>
</ul>
<h3 name="Selecting_a_Project_to_Pull"> Selecting a Project to Pull </h3>
<p>Since several different applications are built from the same basic source code, you must choose which application to checkout on the command line using the <code>MOZ_CO_PROJECT</code> variable. This information has to be supplied when it comes to the checkout of the actual source code (see the appropriate <a href="#Checkout">checkout</a> <a href="#Checkout_2">section</a> below, according to the branch you want to checkout). The possible options include the following:
</p>
<dl><dt> browser </dt><dd> The standalone "Firefox" browser.
</dd><dt> mail </dt><dd> The standalone "Thunderbird" mail/news client.
</dd><dt> suite </dt><dd> The traditional "Mozilla" SeaMonkey suite of browser, mail/news, composer, and other applications.
</dd><dt> minimo </dt><dd> The standalone browser for small devices.
</dd><dt> composer </dt><dd> The standalone HTML composer.
</dd><dt> calendar </dt><dd> The standalone "Sunbird" calendar app.
</dd><dt> xulrunner </dt><dd> The next-generation XUL application launcher.
</dd><dt> camino </dt><dd> The "Camino" native browser for Macintosh.
</dd><dt> tamarin </dt><dd> The Adobe Ecmascript virtual machine.
</dd><dt> all </dt><dd> Check out sources for all of the above projects, plus some additional utility code
</dd></dl>
<p>Multiple projects can be specified with commas: <code>MOZ_CO_PROJECT=suite,browser,xulrunner</code>.
</p><p><b>Note</b> that if you are using a custom <tt><a href="es/Configuring_Build_Options#Using_a_.mozconfig_Configuration_File">.mozconfig</a></tt> file, you can also specify <code>MOZ_CO_PROJECT</code> there, instead of including it on the command line.
</p>
<h3 name="Checking_Out_a_New_Source_Tree"> Checking Out a New Source Tree </h3>
<h4 name="Check_Tinderbox"> Check Tinderbox </h4>
<p>Before pulling a tree, you should always check the appropriate <a href="es/Tinderbox">Tinderbox</a> to make sure that the codebase is not broken. If there are red tinderboxes, it is usually advisable to wait until they are green before pulling a tree.
</p>
<h4 name="Branch_HEAD"> Branch HEAD </h4>
<p>To check out a new source tree from scratch, get the <tt>client.mk</tt> file which contains makefile instructions which are used to pull the rest of the tree:
</p>
<pre class="eval">$ cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
</pre>
<p>Note: if you have already set up a <tt><a href="es/Configuring_Build_Options#Using_a_.mozconfig_Configuration_File">.mozconfig</a></tt> file, you may also need to check out the following files:
</p>
<dl><dt> Firefox </dt><dd> <pre>cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/browser/config/mozconfig</pre>
</dd><dt> Thunderbird </dt><dd> <pre>cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/mail/config/mozconfig</pre>
</dd></dl>
<h4 name="Specific_Branch"> Specific Branch </h4>
<p>If you want to check out the source code of a specific <a class="external" href="http://ximbiot.com/cvs/wiki/index.php?title=CVS--Concurrent_Versions_System_v1.12.12.1:_Branching_and_merging">CVS branch</a>, use
</p>
<pre class="eval">$ cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r BRANCH mozilla/client.mk
</pre>
<p>instead. To, for example, pull the Firefox 2.0 development branch, replace BRANCH above with MOZILLA_1_8_BRANCH. For available branch tags in Mozilla, see <a href="es/CVS_Tags">CVS Tags</a>.
</p><p>The information on pulling project specific <code>.mozconfig</code> files as listed in the <a href="#Branch_HEAD">previous section</a> apply to other branches than HEAD as well of course.
</p>
<h4 name="Checkout"> Checkout </h4>
<p>After having chosen the correct branch, run:
</p>
<pre class="eval">$ cd mozilla
$ make -f client.mk checkout MOZ_CO_PROJECT=<i>option,option</i>
</pre>
<p>As mentioned above, if you are using a custom <code>.mozconfig</code> file where you have already specified the <code>MOZ_CO_PROJECT</code> variable, you do not need to repeat it here on command line.
</p>
<div class="note">Always use <tt>client.mk</tt> to checkout the Mozilla sources: do not check out the <tt>mozilla/</tt> module directly. Various subprojects such as NSS, NSPR, and LDAP C SDK are pulled from stable release tags, even when regular mozilla development occurs on the trunk.
</div>
<h4 name="Specific_Time"> Specific Time </h4>
<p>If you want to check out the source code as it was at a specific time you can use the MOZ_CO_DATE variable. For example <tt>MOZ_CO_DATE="20 Oct 2006 17:00 PDT"</tt>.
</p><p>This can either be added to your <tt><a href="es/Configuring_Build_Options#Using_a_.mozconfig_Configuration_File">.mozconfig</a></tt> file, or specified on the command line, such as
</p>
<pre class="eval">$ cd mozilla
$ make -f client.mk checkout MOZ_CO_DATE="20 Oct 2006 17:00 PDT" MOZ_CO_PROJECT=<i>option,option</i>
</pre>
<h3 name="Changing_the_Source_Tree_to_a_Different_Branch"> Changing the Source Tree to a Different Branch </h3>
<h4 name="Branch_HEAD_2"> Branch HEAD </h4>
<p>In order to update a source tree (be it branch HEAD or a specific branch) to latest branch HEAD, first run:
</p>
<pre class="eval">$ cd mozilla
$ cvs up -A client.mk
</pre>
<p>The -A option removes any "sticky branch" information, which leads to the effect that the tree is updated to HEAD. 
</p>
<h4 name="Specific_Branch_2"> Specific Branch </h4>
<p>To update a source tree which was pulled from a specific branch, start with
</p>
<pre class="eval">$ cd mozilla
$ cvs up -r BRANCH client.mk
</pre>
<p>instead. Replace BRANCH by the tag of the branch you want to update.
</p>
<h3 name="Updating_a_Source_Tree"> Updating a Source Tree </h3>
<p>To update your source tree simply do the following:
</p>
<pre class="eval">$ make -f client.mk checkout MOZ_CO_PROJECT=<i>option,option</i>
</pre>
<p>As always, if you use a custom <code>.mozconfig</code> file where <code>MOZ_CO_PROJECT</code> is already defined, you do not need to repeat it on command line.
</p>
<h3 name="Creating_a_Diff_File"> Creating a Diff File </h3>
<p>In order to create a diff of a single local file against the current file in the repository, use:
</p>
<pre class="eval">$ cvs diff -u8p FILENAME
</pre>
<p>See <a href="es/Creating_a_patch">Creating a patch</a> for more information.
</p>
<h3 name="Converting_a_Downloaded_Source_Tree"> Converting a Downloaded Source Tree </h3>
<p>Downloaded source trees from mozilla.org (<a href="es/Download_Mozilla_Source_Code">source tarballs</a>) are already set up with CVS information, like a normal checkout. You can update these trees like normal trees to the latest code, without special action. See previous section on how to update a source tree.
</p><p><span class="comment">interwiki link</span>
</p>{{ wiki.languages( { "en": "en/Mozilla_Source_Code_(CVS)", "fr": "fr/Obtenir_le_code_source_de_Mozilla_via_CVS", "ja": "ja/Mozilla_Source_Code_Via_CVS", "zh-cn": "cn/\u901a\u8fc7CVS\u83b7\u53d6\u6e90\u7801" } ) }}
Revertir a esta revisión