From 2b2070ee42b7435abc62f58a45fb1523682d03d1 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 4 Jun 2004 03:00:40 +0000 Subject: [PATCH] More polishing --- lang/en/docs/cvs.html | 240 +++++++++++++++++++++++++----------------- 1 file changed, 146 insertions(+), 94 deletions(-) diff --git a/lang/en/docs/cvs.html b/lang/en/docs/cvs.html index 571f64a7c2..2b00d9eb9c 100644 --- a/lang/en/docs/cvs.html +++ b/lang/en/docs/cvs.html @@ -52,85 +52,97 @@

windows-cron - a small package that makes cron possible on Windows systems

docs - various extra user-contributed documentation

-

Most people are working on the existing features in the moodle module, but many are also contributing new ideas in the contrib modules. Once code reaches a certain level of maturity in the contrib area, it migrates over into the main moodle tree.

+

Most people are working on the existing features in the moodle module, but many are also contributing new ideas in the contrib modules. Once code reaches a certain level of maturity in the contrib area, it can be migrated over into the main moodle tree.

 

3. Basic CVS Commands

-

3.1 CVS on Unix

-

Sourceforge CVS uses ssh as a transport layer for security, so you will have to set a CVS_RSH environment variable in your Unix shell. It's best to put these commands in your .bashrc or .cshrc so you don't have to type it all the time:

+

3.1 CVS on Unix

-
setenv CVS_RSH ssh        (for csh, tcsh etc)
-
export CVS_RSH=ssh        (for sh, bash etc)
-
-

Next, you can check out the latest development version of Moodle using this (all one line):

-
-
cvs -z3 -d:ext:myusername@cvs.sourceforge.net:/cvsroot/moodle co moodle
-
-

The command is similar for other CVS modules:

-
-
cvs -z3 -d:ext:myusername@cvs.sourceforge.net:/cvsroot/moodle co contrib
-
-

Don't try to do run this first CVS command over an existing moodle installation: start fresh with a new directory.

-

Note that you will be prompted for mypassword for each command unless you set up authorized keys.

-

Now, you should have a new 'moodle' directory. You can rename it and move it around if you like. Go into it:

-
-
cd moodle 
-
-

All the latest Moodle files should be in there. You can now change files in your copy. To compare your files and directories against the main CVS copy on the server use cvs diff, e.g.:

-
-
cvs diff -c config-dist.php
+      

Sourceforge CVS uses ssh as a transport layer for security, so you will have to set a CVS_RSH environment variable in your Unix shell. It's best to put these commands in your .bashrc or .cshrc so you don't have to type it all the time:

+
+
setenv CVS_RSH ssh        (for csh, tcsh etc)
+
export CVS_RSH=ssh        (for sh, bash etc)
+
+

Next, you can check out the latest development version of Moodle using this (all one line):

+
+
cvs -z3 -d:ext:myusername@cvs.sourceforge.net:/cvsroot/moodle co moodle
+
+

The command is similar for other CVS modules:

+
+
cvs -z3 -d:ext:myusername@cvs.sourceforge.net:/cvsroot/moodle co contrib
+
+

Don't try to do run this first CVS command over an existing moodle installation: start fresh with a new directory.

+

Note that you will be prompted for mypassword for each command unless you set up authorized keys.

+

Now, you should have a new 'moodle' directory. You can rename it and move it around if you like. Go into it:

+
+
cd moodle 
+
+

All the latest Moodle files should be in there. You can now change files in your copy. To compare your files and directories against the main CVS copy on the server use cvs diff, e.g.:

+
+
cvs diff -c config-dist.php
 cvs diff -c lang
-
-

To fetch the latest updates from the server use:

-
-
cvs update -dP 
-
-

To copy your new files back to the server you would do something like:

-
-
cd lang/ca 
+      
+

To fetch the latest updates from the server use:

+
+
cvs update -dP 
+
+

To copy your new files back to the server you would do something like:

+
+
cd lang/ca 
 cvs commit 
+
+

You will be prompted to add some comments (depends on your default text editor) ... add a meaningful comment and close the editor ... the files will be sent to Sourceforge and stored. Done!

+

To save more time you can put default arguments into a file called .cvsrc in your home directory. For example, mine contains:

+
+
diff -c 
+update -dP 
+
+

Try 'cvs help' for more details ...

+

 

-

You will be prompted to add some comments (depends on your default text editor) ... add a meaningful comment and close the editor ... the files will be sent to Sourceforge and stored. Done!

-

To save more time you can put default arguments into a file called .cvsrc in your home directory. For example, mine contains:

+

3.2 CVS on Windows

-
diff -c 
-update -dP 
+

First, you need to download a completely fresh copy of Moodle using your developer account.

-

Try 'cvs help' for more details ...

-

 

-
-

3.2 CVS on Windows

-
-

First, you need to download a completely fresh copy of Moodle using your developer account.

      -
    1. Get TortoiseCVS from tortoisecvs.org and install it, then reboot.
    2. -
    3. Find or create a new folder somewhere where you want Moodle to be downloaded to.
    4. -
    5. Right-mouse-click that folder and choose "CVS Checkout" from the menu. You should see a dialog box.
    6. -
    7. Copy this text into the CVSROOT field (using your own username!): -
       :ext:myusername@cvs.sourceforge.net:/cvsroot/moodle
      -
    8. -
    9. Under the "Module" field, type "moodle" to get the latest development version of Moodle, "contrib" to get the contributions directory, or "mysql" to get the MySQL Admin module.
    10. -
    11. Press the button: "OK" and everything should be downloaded.
      -
    12. +
        +
      1. Get TortoiseCVS from tortoisecvs.org and install it, then reboot.
      2. +
      3. Find or create a new folder somewhere where you want Moodle to be downloaded to.
      4. +
      5. Right-mouse-click that folder and choose "CVS Checkout" from the menu. You should see a dialog box.
      6. +
      7. Copy this text into the CVSROOT field (using your own username!): +
         :ext:myusername@cvs.sourceforge.net:/cvsroot/moodle
        +
      8. +
      9. Under the "Module" field, type "moodle" to get the latest development version of Moodle, "contrib" to get the contributions directory, or "mysql" to get the MySQL Admin module.
      10. +
      11. Press the button: "OK" and everything should be downloaded.
        +
      12. +
-

A dialog box should show all the files being downloaded, and after a while you should have a complete copy of Moodle. After this first checkout, you can fetch the latest updated files from the CVS server:

+
+

A dialog box should show all the files being downloaded, and after a while you should have a complete copy of Moodle. After this first checkout, you can fetch the latest updated files from the CVS server:

+
      -
    1. Right-mouse-click on your Moodle folder (or any file) and select "CVS Update".
    2. -
    3. Sit back and watch the logs scroll by. Take note of conflicts that may occur if your local code has changes that conflict with the incoming versions - you will need to edit these files and resolve the conflicts manually.
      -
    4. +
        +
      1. Right-mouse-click on your Moodle folder (or any file) and select "CVS Update".
      2. +
      3. Sit back and watch the logs scroll by. Take note of conflicts that may occur if your local code has changes that conflict with the incoming versions - you will need to edit these files and resolve the conflicts manually.
        +
      4. +
-

After modifying files (you will notice their icons change from green to red!), you can commit them back to the CVS server like this:

+
+

After modifying files (you will notice their icons change from green to red!), you can commit them back to the CVS server like this:

+
      -
    1. Right-mouse-click on your Moodle folder (or any file) and select "CVS Commit...".
    2. -
    3. In the dialog box, type a clear description of the changes you are committing.
    4. -
    5. Click "OK". Your changes will be sent to the server.
      -
    6. +
        +
      1. Right-mouse-click on your Moodle folder (or any file) and select "CVS Commit...".
      2. +
      3. In the dialog box, type a clear description of the changes you are committing.
      4. +
      5. Click "OK". Your changes will be sent to the server.
        +
      6. +
@@ -142,54 +154,94 @@ update -dP
cvs status -v index.php
-
+

Tags and branches should ALWAYS be applied to the entire module (all of Moodle). Don't tag individual files or directories.
+

4.1 Trunk development

-

The Trunk of CVS is the main development version of Moodle. In CVS it is also known as the HEAD, or default branch.

-

Moodle developers try to keep this stable as possible, but as it usually contains new code it probably has bugs and small instabilities.

-

Every now and then we decide the product has enough features to make a release. At this time, the trunk is tagged with a MOODLE_XX_BETA tag (in case we ever want to roll back to that point) and a new branch is formed for the release, called MOODLE_XX_STABLE.

-

A Beta package is also released at this point - it's for testers who don't use CVS but want to test the latest features and report bugs.

-

 

-

4.2 Stable branches for each release

-

As soon as the stable branch MOODLE_XX_STABLE is created, development efforts will fork into two streams for a while. Some people may continue working on new features in the trunk for the next release, but most developers should be concentrating on using the current STABLE branch and fixing bugs that are found in it.

-

You can switch your local copy of Moodle to the STABLE version using the following command in Unix from the root directory:

-
cvs update -dP -r MOODLE_XX_STABLE
+

The Trunk of CVS is the main development version of Moodle. In CVS it is also known as the HEAD, or default branch.

+

Moodle developers try to keep this stable as possible, but as it usually contains new code it probably has bugs and small instabilities.

+

Every now and then we decide the product has enough features to make a release. At this time, the trunk is tagged with a MOODLE_XX_BETA tag (in case we ever want to roll back to that point) and a new branch is formed for the release, called MOODLE_XX_STABLE.

+

A Beta package is also released at this point - it's for testers who don't use CVS but want to test the latest features and report bugs.

-

After that, all the commands described above will apply to that stable version. To return to the trunk version just issue:

+

 

+

4.2 Stable branches for each release

-
cvs update -dPA
-
-

On Windows clients you should have a menu from which you can choose the branch.

-

Once the new STABLE branch really stabilises, a release can be declared. Packages are created for distribution and the branch will be tagged (by Martin) with a tag named: MOODLE_XXX

-

Periodically, bug fixes in the STABLE branch should be merged into the trunk so that they become available in future versions of Moodle. A floating tag called MOODLE_XX_MERGED will be maintained to keep track of the last merge. The procedure for such a merge is as follows:

-
    +

    As soon as the stable branch MOODLE_XX_STABLE is created, development efforts will fork into two streams for a while. Some people may continue working on new features in the trunk for the next release, but most developers should be concentrating on using the current STABLE branch and fixing bugs that are found in it.

    +

    You can switch your local copy of Moodle to the STABLE version using the following command in Unix from the root directory:

    +
    +
    cvs update -dP -r MOODLE_XX_STABLE
    +
    +

    After that, all the commands described above will apply to that stable version. To return to the trunk version just issue:

    +
    +
    cvs update -dPA
    +
    +

    On Windows clients you should have a menu from which you can choose the branch.

    +

    Once the new STABLE branch really stabilises, a release can be declared. Packages are created for distribution and the branch will be tagged (by Martin) with a tag named: MOODLE_XXX

    +

    Periodically, bug fixes in the STABLE branch should be merged into the trunk so that they become available in future versions of Moodle. A floating tag called MOODLE_XX_MERGED will be maintained to keep track of the last merge. The procedure for such a merge is as follows:

      -
    1. cvs update -dPA
    2. -
    3. cvs update -j MOODLE_13_MERGED -j MOODLE_13_STABLE
    4. -
    5. cvs commit
    6. -
    7. cvs update -dPr MOODLE_13_STABLE
    8. -
    9. cvs tag -RF MOODLE_13_MERGED
    10. +
        +
      1. Get out the very latest trunk version.
        +
        + cvs update -dPA
        +
      2. +
      3. Merge everything on the branch since the last merge, into your trunk version
        +
        + cvs update -j MOODLE_13_MERGED -j MOODLE_13_STABLE
        +
      4. +
      5. Check the merged copy back into CVS trunk version
        +
        +
        cvs commit
        +
      6. +
      7. Go back to the branch version
        +
        + cvs update -dPr MOODLE_13_STABLE
        +
      8. +
      9. Update the floating merge tag so that this process can be repeated next time
        +

        cvs tag -RF MOODLE_13_MERGED

        +
      10. +
    -
-


- Finally, the values for $version in all the Moodle version.php files within the stable branch should not be updated at all if possible (except the last digit if necessary). The reason is that someone updating from a very stable version to the next very stable version could miss database upgrades that happened on the trunk.

+


+ Finally, the values for $version in all the Moodle version.php files within the stable branch should not be updated at all if possible (except the last digit if necessary). The reason is that someone updating from a very stable version to the next very stable version could miss database upgrades that happened on the trunk.

+

 

4.3 Feature branches for large changes

-

Occasionally, there may be a very large feature that needs to be checked in so several people can work on it, but it is too unstable to be included in the main development trunk.

-

In these cases a short-term branch can be created to work on the feature, and then merged back into the main trunk as soon as possible. An example called MOODLE_14_WIDGET branch can be seen in the above diagram.

-

If you need to do this for your new WIDGET feature, follow these steps:

+
+

Occasionally, there may be a very large feature that needs to be checked in so several people can work on it, but it is too unstable to be included in the main development trunk.

+

In these cases a short-term branch can be created to work on the feature, and then merged back into the main trunk as soon as possible. An example called MOODLE_14_WIDGET branch can be seen in the above diagram.

+

If you need to do this for your new WIDGET feature, follow these steps:

+
      -
    1. Discuss with other developers to make sure it's necessary.
    2. -
    3. Make a tag on the trunk called MOODLE_XX_WIDGET_PRE
    4. -
    5. Create your branch called MOODLE_XX_WIDGET
    6. -
    7. Work in that branch until the feature is reasonably stable.
    8. -
    9. Merge the whole branch into the trunk and abandon the branch.
    10. +
        +
      1. Discuss with other developers to make sure it's necessary!
      2. +
      3. Make a new tag on the trunk (for all of moodle) called MOODLE_XX_WIDGET_PRE
        +
        + cvs tag -R MOODLE_XX_WIDGET_PRE +
        +
      4. +
      5. Create your branch called MOODLE_XX_WIDGET
        +
        +
        cvs tag -Rb MOODLE_XX_WIDGET
        +
      6. +
      7. Work in that branch until the feature is reasonably stable. Commit as necessary.
        +
        + cvs commit +
        +
      8. +
      9. When ready, merge the whole branch into the trunk, commit it to the trunk and then abandon the branch.
        +

        cvs update -dPA

        +

        cvs update -j MOODLE_XX_WIDGET

        +

        cvs commit

        +
      10. +
-

 

+
+

 

+
-

Good luck!

+

Good luck, be careful and have fun!

 

Moodle Documentation

-- 2.39.5