|
Size: 20860
Comment:
|
Size: 23107
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 17: | Line 17: |
| * Sage 4.2 or higher is already installed (say in {{{/opt/sage}}}), and can be started by typing {{{sage}}} at the command line (it is recommended to use the most recent stable version, and in particular >= 4.3) |
* You need to have a very recent version of Sage already installed (say in {{{/opt/sage}}}) which can be started by typing {{{sage}}} at the command line (it is recommended to use the most recent stable version, and in particular >= 4.3.1 as of 2010, march the 20) |
| Line 22: | Line 22: |
With Sage < 4.7.1, if you do not already have an hg configuration file {{{$HOME/.hgrc}}} in your home directory, you need to create such a file containing the following (edit your name!!!): {{{ [ui] username = Simon Cussonnet <Simon.Cussonnet at lycee-technique.thorel.eure.fr> }}} |
|
| Line 24: | Line 35: |
| * For simplicity, the server is currently configured with open read-write access (no login/password required). Please do not abuse. * The patch management is based on the version control system Mercurial, with a support script {{{sage -combinat}}} for ease of use. Online help on this script is accessible through: {{{ sage -combinat --help }}} |
* The patch management is based on the version control system Mercurial, with a support script {{{sage -combinat}}} for ease of use. Online help on this script is accessible through: {{{ sage -combinat --help }}} |
| Line 41: | Line 46: |
| ==== Installing the Sage-combinat patches on OS X ==== There occurred several issues installing the Sage-combinat patches on OS X, which have to be solved BEFORE running {{{sage -combinat install}}}. * Have the [[http://developer.apple.com/technologies/tools/|developer tools (XCode)]] installed /* * Have the newest version of gcc installed (update the unix development tools). * gcc must be callable from within the sage folder {{{$SAGEROOT}}}. This can be done by having the path containing gcc (e.g. {{{$HOME/Developer/usr/bin}}}) added to the variable {{{$PATH}}}. * Double-check that you downloaded the appropriate version of Sage (32-bit or 64-bit). */ * Open the file {{{$SAGEROOT/local/bin/sage-check-64}}} in the editor of your choice, and comment out ALL lines starting with "echo" by adding "#" in the beginning of the line. |
|
| Line 52: | Line 72: |
| Line 155: | Line 174: |
| This is the purpose of the patches like {{{sage-3.0.2.patch}}}. This particular patch contains all the sage-combinat patches that have been integrated into Sage 3.0.2, and is only applied if Sage's version is strictly less than 3.0.2. This is achieved through guards (see the next section), and is taken care of automatically by {{{sage -combinat}}}, and in particular by: | This is the purpose of the patches like {{{sage-4.7.patch}}}. This particular patch contains all the sage-combinat patches that have been integrated into Sage 4.7, and is only applied if Sage's version is strictly less than 4.7. This is achieved through guards (see the next section), and is taken care of automatically by {{{sage -combinat}}}, and in particular by: |
| Line 182: | Line 201: |
| The following conventions are used regarding positive and negative version guards: * A patch marked +4_7 is not applied if sage's version >= 4_7 Use case: patches merged in 4.7 or that need rebase for 4.7 * A patch marked -4_7 is not applied if sage's version < 4_7 Use case: patches that don't apply anymore on old versions * A patch should not be marked with both +4_7 an -4_7. |
|
| Line 187: | Line 215: |
| Some configuration is required for write access to the Mercurial server. Open (or create, if it does not exist yet) your Mercurial configuration file ({{{~/.hgrc}}} in your home directory), insert the following, and edit the username: |
Write access to the Mercurial server requires authentication using your Sage's trac account username and password; if you do not yet have a Sage's trac account, create one ([[http://trac.sagemath.org/sage_trac/|instructions]]). Some further configuration is also required. Open (or create, if it does not exist yet) your Mercurial configuration file ({{{~/.hgrc}}} in your home directory), insert the following, and *edit the username, trac username, password, the shortusername* (usually the 2 initials of your first-name/last-name): |
| Line 194: | Line 227: |
| username = Simon Cussonnet <Simon.Cussonnet at lycee-technique.torrez.eure.fr> | username = Simon Cussonnet <Simon.Cussonnet at lycee-technique.thorel.eure.fr> [auth] combinat_patches.prefix = http://combinat.sagemath.org/patches/ combinat_patches.username = <your username on Sage's trac server> combinat_patches.password = <your password on Sage's trac server> |
| Line 197: | Line 236: |
| hgext.highlight= hgext.record= |
|
| Line 198: | Line 239: |
| color= |
|
| Line 200: | Line 243: |
# set the shortusername variable to the letters that define your signature on the patches (e.g. 'sc' for Simon Cussonet) |
|
| Line 201: | Line 247: |
| pre-qrefresh = (echo "Are you sure you want to refresh the following changes:"; sage -hg status; echo -n "into the patch: "; sage -hg qtop; read -p "(y/n)" answer; test "$answer" = "y" ) | pre-qrefresh = (shortusername='sc' ; if [[ "$(sage -hg qtop | grep -c "\-$shortusername.patch$")" != "1" ]] ; then echo -e "\\033[01;05;31m* * * * * * * THIS IS NOT YOUR PATCH * * * * * * *\\033[0;0m" ; fi ; echo "Are you sure you want to refresh the following changes:"; sage -hg status; echo -n "into the patch: "; sage -hg qtop; read -p "(y/n)" answer; test "$answer" = "y") pre-import = (if [ -d $(hg root)/.hg/patches ]; then echo "I'm pretty sure that you don't want to import a changeset !"; echo "Do you mean 'hg qimport <patch>' ?"; exit 1; fi) |
| Line 204: | Line 252: |
| Line 215: | Line 264: |
| <trac ref if any>_<theme>_<feature/fix>_<rev if any>_<owner or final or closed>.patch | <trac ref if any>-<theme>_<feature/fix>_<rev if any>-<owner's shortusername or final or closed>.patch |
| Line 220: | Line 269: |
| trac_5243_getitem_vs_call.patch | trac_9557-fundamental_domains-vd.patch sturmian_words_classes-abm.patch |
| Line 223: | Line 273: |
| trac_7251_integer_parent-nt.patch trac_5038_paths-sl.patch root-systems-lattices_nt.patch crystals-affine_as.patch free-modules_1_mh.patch free-modules_2_mh.patch free-modules_final.patch dyck-words_closed.patch }}} A series of patches like the free_modules one above is intended to be progressively folded together into a single patch free_modules.patch before submission to sage (see patch folding below). The name free_modules_final indicates that the owner of this patch will no longer edit it, and it is ready to be posted to trac. The name *_closed.patch indicates that this patch has been posted to trac and the corresponding ticket has been closed. |
trac_7251_integer_parent-nt.patch trac_7251_integer_parent-review-fs.patch }}} A series of patches like the free_modules one above is intended to be progressively folded together into a single patch trac_7251_integer_parent-nt.patch before submission to sage (see patch folding below). |
| Line 309: | Line 353: |
| OR {{{ sage -hg qrefresh -m "#N: description of the patch" }}} |
|
| Line 391: | Line 439: |
| Open and edit the series file and merge the modifications yourself. Then, when you are done, mark the series file as resolve by doing | Open and edit the series file and merge the modifications yourself. Then, when you are done, mark the series file as resolve by doing |
| Line 410: | Line 458: |
| Sometimes a patch fails to apply and you get, after a | Sometimes a patch fails to apply and you get, after a |
The Sage-Combinat patch server: step by step instructions
This page is meant as a step-by-step tutorial on using the Sage-Combinat patch server, from basic installation to contributing new patches:
Contents
- Installation and basic usage
- Looking and selecting the patches
-
Creating and contributing patches
- Mercurial configuration
- Patch naming convention
- Patch description
- Creating a new patch (qnew)
- Editing the Sage sources
- Refreshing your patch (qrefresh)
- Removing a patch
- Pushing patches to the sage-combinat server
- In the case of Merging conflicts
- Handling rejection
- Exporting Patches for use with trac
- Rebasing the patch queue on a new version of sage
For technical background on the patch server, see http:/combinat/Mercurial.
To do: add a link to a short write up about the rationale for using a patch server.
1. Installation and basic usage
1.1. Prerequisites
The instructions below assume that:
You need to have a very recent version of Sage already installed (say in /opt/sage) which can be started by typing sage at the command line
(it is recommended to use the most recent stable version, and in particular >= 4.3.1 as of 2010, march the 20)
The user has write access to the Sage installation tree
The user has access to: http://combinat.sagemath.org/patches/
With Sage < 4.7.1, if you do not already have an hg configuration file $HOME/.hgrc in your home directory, you need to create such a file containing the following (edit your name!!!):
[ui] username = Simon Cussonnet <Simon.Cussonnet at lycee-technique.thorel.eure.fr>
Notes:
The patch management is based on the version control system Mercurial, with a support script sage -combinat for ease of use. Online help on this script is accessible through:
sage -combinat --help
1.2. Downloading and installing the Sage-combinat patches
sage -combinat install
1.2.1. Installing the Sage-combinat patches on OS X
There occurred several issues installing the Sage-combinat patches on OS X, which have to be solved BEFORE running sage -combinat install.
Have the [[http://developer.apple.com/technologies/tools/|developer
- tools (XCode)]] installed
