Jump to content

Calligra/Contributing a Patch: Difference between revisions

From KDE Community Wiki
Jstaniek (talk | contribs)
No edit summary
Cyrille (talk | contribs)
Line 7: Line 7:
== Create a patch ==
== Create a patch ==


In order to create a patch with git, which complies to the formatting expected by reviewboard:
In order to create a patch with git:
* first create the following script:
* in your branch: git diff master
  #!/bin/sh
* from master: git diff branchname
  REV=`git svn find-rev $(git-rev-list --date-order --max-count=1 git-svn)`
  git diff --no-prefix $* HEAD | sed -e 's/^+++ .*/&  (working copy)/' -e "s/^--- .*/&  (revision $REV)/"
  | sed -e "N;s/^--- \/dev\/null  (revision $REV)\n+++ \([A-Za-z\/\.]*\)  (working copy)/--- \1  (revision 0)\n+++ \1  (working copy)/"
 
* rebase and reset the index to the remote version: which means, the last commit is remote HEAD and all your local changes appear as uncommited changes (if new files were created, make sure they have been added to the index, git add is your friend there).
 
* run the script, outputing the result to a file. Voilà, you have your patch.


== Submit it to review board ==
== Submit it to review board ==

Revision as of 08:12, 23 May 2011

This page describes how one can send a contributed patch for discussion to the Calligra developers.

Quick Links:

Create a patch

In order to create a patch with git:

  • in your branch: git diff master
  • from master: git diff branchname

Submit it to review board

If you are new to Calligra development you should almost submit almost always your patch to Calligra on KDE's review board. But some code need to be reviewed even if it is created by long time core developers. If you are unsure check out the rules of the review board.

  • Log in to the review board. If it's the first time you use it, you have to create an account as well.
  • Click on "New Review Request"
  • ??? In "Base Diff Path", put "trunk/" with the source directory where you generated the patch (ie where you executed "svn diff") appended
  • In Diff select the patch you want to upload
  • After clicking on "Create a review request" you will have to add "calligra" in the list of group and a description
  • Don't forget to press "publish" at the top of the page

For previous requests, see also the old KOffice SVN reviewboard page.