Edgewall Software

Changes between Version 13 and Version 14 of TracDev/SubmittingPatches


Ignore:
Timestamp:
Dec 12, 2010, 12:39:20 PM (13 years ago)
Author:
Christian Boos
Comment:

also mention Mercurial and Git as alternatives for doing the checkout

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/SubmittingPatches

    v13 v14  
    4141}}}
    4242
    43 See [DevelopmentEnvironmentSetup how to setup a development environment].
     43If you're familiar with DVCS systems like Git or Mercurial, all the better, you should rather pick one of the official mirrors (see TracRepositories#OfficialMirrors) and develop your patches using these tools. The advantage over Subversion is that you can "document" your patches by directly adding a commit log message to them and the tool will help you maintain your patches while Trac continues to evolve upstream.
     44
     45Then see [DevelopmentEnvironmentSetup how to setup a development environment].
    4446
    4547== Make some changes ==
     
    6365}}}
    6466
     67The same applies if you use Mercurial, and in Git you'll also have to "add" modified files to the index.
     68
    6569== Make the patch ==
    6670
     
    7377
    7478Note that `svn diff` will generate a diff in the unified format. If for some reason you use the `diff` tool to produce the patch, then please use `diff -u` otherwise the diff won't be an unified diff.
     79
     80With Mercurial or Git, make a commit with a detailed log message (the one you'd like to see later on in Trac itself!) and then export it.
     81
     82With mercurial, assuming your patch corresponds to the latest commit:
     83{{{
     84hg export tip > my_patch_file.diff
     85}}}
     86
     87With git, assuming your patch corresponds to the head:
     88{{{
     89git show  > my_patch_file.diff
     90}}}
    7591
    7692== Submit the patch ==
     
    98114 - and of course, the quality of the code, the pertinence of the fix or the feature is the main criterion
    99115
    100 See for example #9718.
     116See for example #8935, #9718.
    101117
    102118That 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.