Edgewall Software

Changes between Version 6 and Version 7 of TracDev/SubmittingPatches


Ignore:
Timestamp:
Jun 17, 2009, 6:10:09 PM (15 years ago)
Author:
Christian Boos
Comment:

Some tips to increase the chance of a patch getting accepted: #Whatisagoodpatch

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/SubmittingPatches

    v6 v7  
    3333Bug fixes for a current release may be added on the "stable" branch:
    3434{{{
    35 svn checkout http://svn.edgewall.org/repos/trac/branches/0.10-stable trac-0.10-stable
     35svn checkout http://svn.edgewall.org/repos/trac/branches/0.11-stable trac-0.11-stable
    3636}}}
    3737
     
    4141}}}
    4242
     43See [../DevelopmentEnvironmentSetup how to setup a development environment].
     44
    4345== Make some changes ==
    4446
    45 Go ahead and make your changes to the Trac code.  [TracTroubleshooting#ModifyingtheCode Test them out].
     47Go ahead and make your changes to the Trac code.
     48Test them using [TracTroubleshooting#ModifyingtheCode tracd].
    4649
    4750== Adding files ==
     
    6871If there is an existing ticket related to the changes you've made attach your patch file to that ticket.  Otherwise please create a new ticket and attach your patch file.  Be sure to provide a comment briefly explaining your changes.
    6972
    70 Add the text "[PATCH]" at the beginning of the ticket's "Summary" field as a hint to developers that a possible patch has been provided.
     73You may add the text "[PATCH]" at the beginning of the ticket's "Summary" field as a hint to developers that a possible patch has been provided.
    7174
    72 ----
    73 See also: TracDev
     75== What is a good patch? ==
     76
     77Now, having written a patch is no guarantee that the change will actually make it into the repository.
     78The patch has to be endorsed by a Trac developer, who will carry the burden to maintain that change over time. So the patch has to be convincing on different accounts:
     79 - clarity
     80   - no spurious changes like whitespace change or other random reformattings
     81   - no unrelated changes; if some refactoring really needs to be done as a preliminary to the actual change, better do that in a separate patch
     82   - strict adherence to the [../CodingStyle coding style]
     83 - maintainability
     84   - comments for the parts that needs to be commented, no more, no less
     85   - add [../UnitTests unit tests] and/or [../FunctionalTests functional tests]
     86   - make sure existing tests still pass with your change applied
     87 - and of course, the quality of the code, the pertinence of the fix or the feature is the main criterion
     88
     89That can be hard to get right the first time, so you'll certainly get asked to improve your patch. You should be willing to take feedback into account and maybe do a few iterations of the patch, if needed.
     90
     91Also useful reading: Mercurial:SuccessfulPatch#How_to_describe_your_successful_patch.
     92