Sugar Patches: Difference between revisions

From OLPC
Jump to navigation Jump to search
(New page: = Create a patch = Normally you can get a patch from git with: git diff If you already committed part or all of the new code you need to specify the id of the last commit before yours:...)
 
(→‎Create a patch: git diff shortcut)
 
Line 8: Line 8:


git diff 34a4876f93894309f77b00281b5cb1bb72b3a1e4
git diff 34a4876f93894309f77b00281b5cb1bb72b3a1e4

Or if the commit you want the diff of was the most-recent commit, you can do:

git diff HEAD^!


= Submit the patch for review =
= Submit the patch for review =

Latest revision as of 12:45, 2 August 2007

Create a patch

Normally you can get a patch from git with:

git diff

If you already committed part or all of the new code you need to specify the id of the last commit before yours:

git diff 34a4876f93894309f77b00281b5cb1bb72b3a1e4

Or if the commit you want the diff of was the most-recent commit, you can do:

git diff HEAD^!

Submit the patch for review

  • Open a new Trac ticket if one doesn't already exist.
  • Attach the patch to the ticket.
  • Add "review?" to the keywords.

Review process

  • The reviewer will add comments about the patch on the ticket and reset the keyword to "review-" if the patch needs work.
  • Address all the issues pointed out by the reviewer, attach an updated patch and reset the keyword to "review?".
  • When the reviewer is satisfied with the patch he will set the keyword to "review+".

Push the patch

Patches with a "review+" keyword can be pushed to repository. If you have write access to the sugar repository you can just do it yourself. If appropriate close the bug as fixed when the patch is pushed.

If you don't have write access to the repository commit the patch to your local repository.

git commit

Generate a patch set using git. The following command will create one file per commit in the current directory.

git-format-patch origin

Tar up all the patch files and attach them to the ticket.

Remind the maintainers about patches

If you don't get any response from the maintainers about the patches you submitted in a few days, feel free to remind about them using the Sugar mailing list or IRC channel.