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.

<strong>Sage</strong> Developer’s <strong>Guide</strong>, Release 6.1.11.1.3 Uploading Changes to TracAt some point, you may wish to share your changes with the rest of us: maybe it is ready for review, or maybe you arecollaborating with someone and want to share your changes “up until now”. This is simply done by:[user@localhost]$ sage -dev pushOn trac, your remote branch will be called u//ticket/. This name will automaticallybe added to the “Branch:” field on the ticket. Other developers then know where to find your work in the gitrepository.It is common to go through some iterations of sage -dev commit before you upload, and you will probably alsohave uploaded a few times before your changes are ready for review.If you are happy with the changes you uploaded, you want somebody else to review them, so they can be included intothe next version of <strong>Sage</strong>. If your ticket is ready for review, you should set it to needs_review on the trac server.This can be done though the web interface, or, alternatively, using the development scripts. For the latter, run:[user@localhost]$ sage -dev edit-ticketThis will give you an editor in which you can edit the ticket. Change the status to:Status: needs_reviewAnd add yourself as an author for that ticket by inserting the following as the first line:Authors: Your Real NameIf you want to add an additional comment for potential reviewers, run:[user@localhost]$ sage -dev comment1.1.4 Starting Without a TicketYou might not want to create a trac ticket for your changes. For example, if you are only working on your own codeor if you are making experimental changes that you are likely to throw away if they do not work out. In that case, youcan also start a branch that only lives in your local repository. To do this, you use checkout but specify a branch nameinstead of the ticket number. For example, to create a new branch my_branch, you would run:[user@localhost]$ sage -dev checkout --branch my_branchThis is assuming that you do not already have a local branch called my_branch. If that were the case, you would justswitch to the already-existing branch. Once on your branch, you can work with it as described in Editing the SourceCode.You can upload your local branch later to an existing ticket. This works exactly like in the case where you started witha ticket, except that you have to specify the ticket number. That is:[user@localhost]$ sage -dev push --ticket where you have to replace with the number of the trac ticket.1.2 MergingAs soon as you are working on a bigger project that spans multiple tickets you will want to base your work on branchesthat have not been merged into <strong>Sage</strong> yet. This is natural in collaborative development, and in fact you are very much1.2. Merging 5

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

Saved successfully!

Ooh no, something went wrong!