Jump to content

Calligra/Contributing a Patch: Difference between revisions

From KDE Community Wiki
Cyrille (talk | contribs)
Created page with 'This page describes how one can send a contributed patch for discussion to the KOffice developers. == Create a patch == === SVN Users === The easiest way to make a patch is to ...'
 
Jstaniek (talk | contribs)
No edit summary
Line 1: Line 1:
This page describes how one can send a contributed patch for discussion to the KOffice developers.
This page describes how one can send a contributed patch for discussion to the Calligra developers.


== Create a patch ==
== Create a patch ==


=== SVN Users ===
=== SVN Users ===
The easiest way to make a patch is to have a checkout of koffice source tree, and to run "svn diff > mypatch.diff" at the koffice root.
The easiest way to make a patch is to have a checkout of Calligra source tree, and to run "svn diff > mypatch.diff" from the calligra root dir.


=== Git Users ===
=== Git Users ===
Line 21: Line 21:
== Submit it to review board ==
== Submit it to review board ==


If you are new to KOffice development you should almost submit almost always your patch to [http://reviewboard.kde.org/groups/koffice/ KOffice on KDE's review board]. But some code
If you are new to Calligra development you should almost submit almost always your patch to [http://reviewboard.kde.org/groups/calligra/ 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
need to be reviewed even if it is created by long time core developers.  If you are
unsure check out the [[Calligra/Review board rules|rules of the review board]].
unsure check out the [[Calligra/Review board rules|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.
* 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"
* 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 "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
* In Diff select the patch you want to upload
* After clicking on "Create a review request" you will have to add "koffice" in the list of group and a description
* 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
* Don't forget to press "publish" at the top of the page
For previous requests, see also the [http://reviewboard.kde.org/groups/koffice/ old KOffice SVN reviewboard page].

Revision as of 21:14, 13 December 2010

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

Create a patch

SVN Users

The easiest way to make a patch is to have a checkout of Calligra source tree, and to run "svn diff > mypatch.diff" from the calligra root dir.

Git Users

In order to create a patch with git, which complies to the formatting expected by reviewboard:

  • first create the following script:
 #!/bin/sh
 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

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.