12.07.2015 Views

Sage Developer's Guide - Mirrors

Sage Developer's Guide - Mirrors

Sage Developer's Guide - Mirrors

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTERONESAGE DEVELOPMENT PROCESSThis section is a concise overview of the <strong>Sage</strong> development process. In it, we will see how to make changes to the <strong>Sage</strong>source code and communicate these changes back to the <strong>Sage</strong> project. If you are a beginner to <strong>Sage</strong> development, thisintroductory guide is here to help you become familiar with the <strong>Sage</strong> development process.<strong>Sage</strong> comes with a set of developer scripts, which help you with common interactions with the bug tracker (see The<strong>Sage</strong> Trac Server) and with handling revisions of your code. The developer scripts use the git distributed revisoncontrol system under the hood which you’ll have to install (see Setting Up Git), but you do not need to know anythingabout it (see Git the Hard Way only if you want to).Most of the commands in the following section will not work unless you have an account on the bug tracker. If youwant to contribute to <strong>Sage</strong>, it is a good idea to get an account now (see Obtaining an Account).We assume here that the sage executable of your development installation of <strong>Sage</strong> is in your PATH. If this is notthe case, you might have to replace sage by ./sage or /path/to/sage in the following. You can also use thedeveloper scripts from the <strong>Sage</strong> prompt. All commandline options to sage -dev are also available as methods ofthe dev object in a <strong>Sage</strong> session. That is, for example, to checkout a ticktet you can either run:[user@localhost]$ sage -dev checkout --ticket 1729On ticket #1729 with associated local branch "ticket/1729".# Use "sage --dev merge" to include another ticket/branch.# Use "sage --dev commit" to save changes into a new commit.in a terminal or, equivalently, within <strong>Sage</strong>sage: dev.checkout(1729)On ticket #1729 with associated local branch "ticket/1729".# Use "dev.merge()" to include another ticket/branch.# Use "dev.commit()" to save changes in a new commit.Note that the number sign # (a.k.a. hash or pound sign) is the comment marker for both the shell and Python. So ifyou were to input #1729, it will be interpreted as the comment “1729” and not passed to the development scripts.Always specify the ticket number as a plain number, without the number sign in front.Warning: During the transitional period it can happen that you end up on a branch where the developer scriptsare not available or outdated. If this is the case, i.e., if sage -dev does not work properly anymore, run:git pull git://trac.sagemath.org/sage.git mastersage -bThis will merge the latest version of the developer scripts with your current branch. After rebuilding the <strong>Sage</strong>library, the dev scripts will work again.3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!