Changes between Version 13 and Version 14 of TracDev/SubmittingPatches
- Timestamp:
- Dec 12, 2010, 12:39:20 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/SubmittingPatches
v13 v14 41 41 }}} 42 42 43 See [DevelopmentEnvironmentSetup how to setup a development environment]. 43 If 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 45 Then see [DevelopmentEnvironmentSetup how to setup a development environment]. 44 46 45 47 == Make some changes == … … 63 65 }}} 64 66 67 The same applies if you use Mercurial, and in Git you'll also have to "add" modified files to the index. 68 65 69 == Make the patch == 66 70 … … 73 77 74 78 Note 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 80 With 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 82 With mercurial, assuming your patch corresponds to the latest commit: 83 {{{ 84 hg export tip > my_patch_file.diff 85 }}} 86 87 With git, assuming your patch corresponds to the head: 88 {{{ 89 git show > my_patch_file.diff 90 }}} 75 91 76 92 == Submit the patch == … … 98 114 - and of course, the quality of the code, the pertinence of the fix or the feature is the main criterion 99 115 100 See for example # 9718.116 See for example #8935, #9718. 101 117 102 118 That 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.