Changes between Version 13 and Version 14 of HowToSubmitPatches


Ignore:
Timestamp:
Feb 20, 2015, 10:28:13 PM (5 years ago)
Author:
bpetty
Comment:

svn to git migration updates

Legend:

Unmodified
Added
Removed
Modified
  • HowToSubmitPatches

    v13 v14  
    11= How to Submit Patches =
    2 '''The bottom line:''' ''Attach an unified diff against svn trunk (or stable branch, when appropriate), remember to update docs and unit tests.''
     2
     3'''The bottom line:''' Attach an unified diff against the git master branch (or stable branch, when appropriate), remember to update docs and unit tests.
    34
    45User feedback and, especially, patches are very important for wxWidgets. They often help us improve wxWidgets' quality and fix bugs, so we are of course happy if you contribute them (how could we dislike your help, after all?). But we have all sort of problems with applying non-standard patches. To make life easier for both you and us, please follow the few simple rules below when submitting patches.
     
    78
    89== Changing wxWidgets ==
    9  * '''Follow the rules''': Please read the [http://www.wxwidgets.org/develop/standard.htm wxWidgets coding standards] and try to conform to them. In particular, please respect the indentation rules (4 spaces, no TABs) as it makes really difficult to read the patches otherwise.
     10
     11 * '''Follow the rules''': Please read the [https://www.wxwidgets.org/develop/coding-guidelines/ wxWidgets coding standards] and try to conform to them. In particular, please respect the indentation rules (4 spaces, no TABs) as it makes really difficult to read the patches otherwise.
    1012
    1113 * '''Unit tests''': Please update (or add) unit tests for any easily testable (i.e. non purely GUI) functionality that you modify or add. Our test suite doesn't cover 100% of wxWidgets code yet but we'd really like it to and we prefer not to add new classes or functions without tests.
     
    1618
    1719== Mechanics of patch submission ==
     20
    1821 * '''Use the latest version''': Please try to always make your patches against the latest version of wxWidgets.
    1922
    20   In most cases, you should make a patch against SVN trunk. If the bug is only in stable branch or it was already fixed in the trunk, make the patch against the stable SVN branch. You can learn how to download the source from SVN [http://www.wxwidgets.org/develop/svn.htm#setup here].
     23  In most cases, you should make a patch against the git master branch. If the bug is only in stable branch or it was already fixed in master, make the patch against the stable git branch. You can learn how to download the source from git [https://www.wxwidgets.org/develop/code-repository/ here].
    2124
    22   If you cannot access SVN (for example when you are behind a firewall), please make the patch against latest release or, better, against fresh SVN snapshot (downloadable from [http://wxwindows.sourceforge.net/snapshots/ here]).
     25  If you cannot access git (for example when you are behind a firewall), please make the patch against latest release or, better, against fresh git snapshot (latest download: [https://github.com/wxWidgets/wxWidgets/archive/master.zip master.zip]).
    2326
    2427 * '''Standard patch format''': Do '''NOT''' send us ZIP archives, whole files or even worse, only code snippets. Patch is something that we could apply with one command, not arbitrary text that we'd spend hours trying to understand.
    2528
    26   The advantage of using diff is that it produces one file with differences in all files you modified and what's more, diff files are small, easy to read and understand and can be applied even if the affected files have been changed since the moment when the patch was submitted. The ''only'' exception to this rule is for the translations: unfortunately, `.po` files change a lot each time they are regenerated because all line numbers recorded in them change, and this risks making any patches to them unappliable very quickly. So for these files, and only for them, please submit the whole files and not patches to the existing ones. You can use `diff` program which is a standard part of most Unix systems and is available as part of cygwin package or elsewhere for Windows or, alternatively, you can just use `svn diff` command which works almost in the same manner as diff if you are already using SVN. The best way to make a patch is to use this command from the root wxWidgets directory:
     29  The advantage of using diff is that it produces one file with differences in all files you modified and what's more, diff files are small, easy to read and understand and can be applied even if the affected files have been changed since the moment when the patch was submitted. The ''only'' exception to this rule is for the translations: unfortunately, `.po` files change a lot each time they are regenerated because all line numbers recorded in them change, and this risks making any patches to them unappliable very quickly. So for these files, and only for them, please submit the whole files and not patches to the existing ones. You can use `diff` program which is a standard part of most Unix systems and is available as part of cygwin package or elsewhere for Windows or, alternatively, you can just use `git diff` command which works almost in the same manner as diff if you are already using a git clone. The best way to make a patch is to use this command from the root wxWidgets directory:
    2730
    28   `svn diff > mypatch.patch`
     31  `git diff origin/master... > mypatch.patch`
    2932
    30   or this one from the parent directory
    31 
    32   `svn diff wxWidgets-2.8 > mypatch-for-stable-branch.patch`
     33  Alternatively, use the appropriate base git ref (i.e. for WX_3_0_BRANCH)
    3334
    3435  If you use a standalone `diff` you need to add the `-u` option, i.e.:
     
    3637  `diff -uNr wxWidgets-orig wxWidgets-mine > mypatch.patch`
    3738
    38   If your patch adds or removes files you should run `svn add` or `svn remove` before using `svn diff` if you're using svn for making the patch. And if you use a standalone diff program locally, you need to use `-N` option for the new files to be included in the patch.
     39  If your patch adds or removes files and you use a standalone diff program locally, you need to use `-N` option for the new files to be included in the patch.
    3940
    4041 * Use standard '''extension .diff or .patch''' for the patch file: Trac is capable of displaying the attachments with these extensions directly in the web interface which is very useful for the initial examination.
     
    4748
    4849== Submitting the patch ==
    49  * '''Use Trac''': Please do '''not''' send the patches to the wx-dev mailing list, nor to any developer's personal email address. Instead, use the tracker. Then you will be notified when the patch is accepted or if there is a problem with applying the patch.
     50
     51 * '''Use Trac''': Please do '''not''' send the patches to the wx-dev mailing list, nor to any developer's personal email address. Instead, use the tracker. Then you will be notified when the patch is accepted or if there is a problem with applying the patch. Alternatively, we will also accept GitHub pull requests, however, we still prefer patches submitted to Trac.
    5052
    5153 * '''Describe your changes''': Please fill in the ticket form according to HowToSubmitTicket and describe the patch as precisely as possible in the `Description` field. Remember that it is often not easy to understand the purpose of your patch just from its source code. Alternatively, you may post a message explaining what your patch does to wx-dev mailing list.